Re: How to ensure only one of two sets of optional information?

From: abombss <>
Date: 22 Dec 2003 12:07:30 -0800
Message-ID: <>

"Marshall Spight" <> wrote in message news:<AwIEb.88899$8y1.292404_at_attbi_s52>...
> I could do it with a database constraint. Is there a structural
> way to do it that I'm not seeing? If I have to use a constraint,
> is there a canonical form for this particular example? It seems
> like a common thing to want to do, but I haven't come across
> how to address the subtype-data-exclusion issue anywhere.

Here is an article that describes how to create a multi-table primary key. While this is not built directly into the RDBMS it can be achieved through stored procedures and triggers. Using Celko's mutual inclusion pattern and these multi-table constraints you can ensure that every row in the account table will have a referencing row in one of the sub account tables.

Adam Received on Mon Dec 22 2003 - 21:07:30 CET

Original text of this message