Re: Relation problem

From: Kristian Damm Jensen <kristian-Damm.Jensen_at_REMOVEcapgemini.dk>
Date: Fri, 19 Jan 2001 15:15:16 +0100
Message-ID: <3A684BF4.B12AC1F6_at_REMOVEcapgemini.dk>


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.

--
Kristian Damm Jensen              | Feed the hungry. Go to 
kristian-damm.jensen_at_capgemini.dk | http://www.thehungersite.com
Received on Fri Jan 19 2001 - 15:15:16 CET

Original text of this message