Re: Relation problem
From: <MSherrill_at_compuserve.com>
Date: Sat, 27 Jan 2001 01:04:52 GMT
Message-ID: <3a721e34.37187262_at_news.compuserve.com>
Date: Sat, 27 Jan 2001 01:04:52 GMT
Message-ID: <3a721e34.37187262_at_news.compuserve.com>
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
There's a good reason it's not there.
>ALTER TABLE Parties
>constraint in your SQL:
>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. It's an interesting approach, but I don't think it will catch on in practice.
-- Mike Sherrill Information Management SystemsReceived on Sat Jan 27 2001 - 02:04:52 CET