| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Relation problem
How about using two addressLink tables?
PersonAddressLink and OrgAddressLink. Each of these can be related to the address table, and in turn an org is related to the orgaddresslink table. It would make implementation a bit more complex, since we now have two addresslink tables but easy enought. Now, we could have people and org sharing addresses, but that is Ok as long a people don't have the same address twice.
Michel
Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl> wrote in message
news:94ver7$ond$1_at_news.tue.nl...
> wrote:
> > On 26 Jan 2001 23:25:21 GMT, hidders_at_REMOVE.THIS.win.tue.nl (Jan
> > Hidders) wrote:
> >
> > >By now I hope that you understand that I am missing the following
> > >constraint in your SQL:
> >
> > There's a good reason it's not there.
> >
> > >ALTER TABLE Parties
> > >ADD CONSTRAINT AbstractClass
> > >CHECK (
> > > EXISTS (
> > > SELECT * FROM Persons WHERE Persons.PersonID = Parties.PartyID
> > > )
> > > OR
> > > EXISTS (
> > > SELECT * FROM Organizations WHERE Organizations.OrgID =
Parties.PartyID
> > > )
> > >)
> >
> > Add that constraint, and you can't add rows to any of the tables.
>
>
>
>
> PS. Can I ask you to set you full name in your newsreader? I believe
> you are using Forte Free Agent so that should be possible in
> 'Preferences' under the 'User' tab. Otherwise the attribution of
> what you wrote will sometimes look a bit awkward as is the case in
> this posting.
>
![]() |
![]() |