Re: Relation problem
Date: 19 Jan 2001 17:06:00 GMT
Message-ID: <949s5o$k1s$2_at_news.tue.nl>
Kristian Damm Jensen wrote:
> MSherrill_at_compuserve.com wrote:
> >
> > On Thu, 18 Jan 2001 01:46:24 GMT, "Michel" <microworld_at_sympatico.ca>
> > wrote:
> >
> > >Designing this large database where we store adresses as their own
> > >entity. i.e. an address exist by itself. We also have individuals
> > >AND organizations that can have have more than 1 address. So far
> > >so good, created a link table were I wanted to use the primary key
> > >as individualID and AddressID.
> > >
> > >This would be great, but it's got to be an individual OR an
> > >organization, so I cant have referencial integrity enforced at the
> > >database level.
> >
> > Use a table of parties instead.
> >
> > Parties
> > --
> > PartyID
> > PartyFullName (Like you'd find in the phone book or a Rolodex.)
> > KindOfParty ("Individual", "Organization")
>
> Exactly.
>
> Implement Parties as a supertype to Individuals and Organisations.
-- Jan HiddersReceived on Fri Jan 19 2001 - 18:06:00 CET