Re: How to code a supertype subtype relationship

From: <bogstonkott_at_netscape.net>
Date: 26 Mar 2004 12:36:58 -0800
Message-ID: <901972da.0403261236.3df46040_at_posting.google.com>


"Mikito Harakiri" <mikharakiri_at_iahu.com> wrote in message news:<brn8c.19$ry2.76_at_news.oracle.com>...
> <bogstonkott_at_netscape.net> wrote in message
> news:901972da.0403241318.7ee14071_at_posting.google.com...
> > "Tom Hester" <$$tom_at_metadata.com> wrote in message
> news:<76b19$4060bb79$45033832$26263_at_msgid.meganewsservers.com>...
> > > The two most common ways are the one that you are using and adding the
> > > columns of subtypes to the supertype table and allowing attributes of X
> for
> > > example to be null for a subtype Y.
> >
> > Well, that confirms pretty much what my co-workers and I were
> > thinking. Adding the subtypes to the supertype isn't practical in our
> > situation. There is one supertype with ten subtypes.
>
> Perhaps the large number of subtypes indicates some flaw in the design? You
> aren't programming mammal classification, aren't you? (For huge hierarchies
> type-subtype paradigm breaks anyway, as one better program generic
> parent-child relationship instead of making them types).

Very good! The data model I am working with is not ideal, but it is correct for the problem at hand. Three people have beat on this data model and have agreed that the design is the best we can do. An existing data model is being converted here. The historical data must be preserved. Compromises must be made.

> > The smallest
> > subtype has 15 columns. To combine into one table there would be over
> > 200 columns. That's not pretty. Thanks.
>
> Thanks god somebody still is able to smell if the design stinks! Normally,
> people give it much less thought. You might enjoy googling the thread
> "Stupidest table I ever saw".

Surely that table is not in production anywhere on this planet. Received on Fri Mar 26 2004 - 21:36:58 CET

Original text of this message