Re: Relation problem

From: <MSherrill_at_compuserve.com>
Date: Sun, 21 Jan 2001 15:47:03 GMT
Message-ID: <3a6b03ea.4744832_at_news.compuserve.com>


On 21 Jan 2001 00:26:30 GMT, hidders_at_REMOVE.THIS.win.tue.nl (Jan Hidders) wrote:

>I am afraid that these magic words also don't make the problem go
>away. :-)

Depends on what the problem really is. See below.

>This supertype is a generalization of Individuals and Organizations.
>That means that every Party is either an Individual or an Organization.

It means that one table, Parties, takes the place of the tables Individual and Organization at their original level of abstraction. Attributes common to individuals and organizations move from those tables into the table Parties.

It also means that one FK for the table of party addresses no longer comes from either of two domains (Individuals or Organizations), it comes from just one--the table Parties.

>If you don't implement
>this constraint then you haven't solved the prolem that there may be
>addresses in the Address table that don't belong to any Individual or
>Organization.

I could be wrong, but I don't see *that* problem anywhere in the thread. The problem I see is that the OP can't use DRI for a column that can come from either of two tables. Using a supertype does solve that problem.

>And that is what the original problem was.

I don't think so. Maybe Michel will jump in and make it clear.

-- 
Mike Sherrill
Information Management Systems
Received on Sun Jan 21 2001 - 16:47:03 CET

Original text of this message