Re: unique primary key shared between multiple tables.
Date: Fri, 14 Mar 2003 13:37:57 -0500
"programmer" <BROWNHIK_at_Syntegra.Bt.Co.Uk> wrote in message
> "ben" <benc_at_email.arizona.edu> 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,
> by a flag.
From the original description of the problem, what makes you assume PrivateOwner and BusinessOwner share any similar attributes other than ownerNo? What happens later when the business needs to introduce a PublicSectorOwner? Received on Fri Mar 14 2003 - 19:37:57 CET