[Tfug] Inheritance in RDBMS's (PostgreSQL, Oracle, et al.)
Bexley Hall
bexley401 at yahoo.com
Thu Aug 6 21:08:54 MST 2009
Hi Terence,
[snip]
>> What's the downside of using inheritance in designing
>> data models for RDBMS's?
>
> Extremely difficult to maintain.
Hmmm... that's a biggie! :> But, if the model *doesn't*
change (or, if that change is essentially in the form of
a "product upgrade" which automates this for the user...)
> If the base type changes then the
> data would need to be reloaded. The simple type I showed
> does not have methods but adding verious member functions
> can be very helpful..
OK. Using "accessors", and the like?
> Need to practice good discipline in coding and naming
Ah, I guess keeping track of the various "players" could
become confusing (what's where).
>> Conversely, are there any (LESS OBVIOUS) advantages
>> to this approach?
>
> If the base type is well
> defined addition can be easy. Doing versioning can
> become a snap because base columns are there and
> additional columns are there based on version.
I'm not sure I understand how this is a consequence of inheritance?
Could you elaborate?
>> Any general issues to avoid or exploit to take better
>> advantage of this capability?
> Create constructor and helper methods to make access even
> smother.
Thanks!
--don
More information about the tfug
mailing list