Re: Design question regarding data typing

From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 24 Feb 2006 10:25:40 -0800
Message-ID: <1140805540.547052.318200_at_v46g2000cwv.googlegroups.com>


Jacob JKW wrote:
> Marshall Spight wrote:
> >
> > What you are describing is actually the canonical way to model
> > a base type and two subtypes in SQL. I am unclear why you
> > object to the design; you haven't said anything negative about
> > it so far besides the fact that you don't like it.
>
> OK. That's perfectly faiir. It actually makes me a little feel better
> that what I assumed was my own ugly little kludge is in fact proper.
> It's just *feels* like sloppy design to me. It certainly would be
> improper in the context of an OO programming model, but if you're
> assuring me it's kosher then I'll just plow on ahead. :-)

With OO models, you cannot have an object that participates in more than one subtype relationship; with the RM you can. This makes the complicated cases possible but makes the simple case (just one subtype) a bit harder. This is likely what you are perceiving.

Consider what happens if you have an institution that is both a bank and a school.

Marshall Received on Fri Feb 24 2006 - 19:25:40 CET

Original text of this message