Re: unique primary key shared between multiple tables.

From: programmer <BROWNHIK_at_Syntegra.Bt.Co.Uk>
Date: Fri, 14 Mar 2003 10:49:37 -0000
Message-ID: <b4sch2$bk5$>

"ben" <> wrote in message
> In one of my database design textbooks, I ran across the following
> line:
> PropertyForRent(propertyNo, ownerNo)
> Foreign Key ownerNo references PrivateOwner(ownerNo) and
> BusinessOwner(ownerNo)
> This implies that I can make PrivateOwner.ownerNo and
> BusinessOwner.ownerNo unique not just for thier respective tables, I
> can make ownerNo unique across both tables. In other words, no
> PrivateOwner.ownerNo may have the the same value as any
> BusinessOwner.ownerNo.
> This would be extremely usefull, but I can't find any way to actually
> implement a shared primary key between tables. How do I do this?

Put all private owners and business owners in the same table, distinguished by a flag. Received on Fri Mar 14 2003 - 11:49:37 CET

Original text of this message