Re: unique primary key shared between multiple tables.

From: Bob Badour <bbadour_at_golden.net>
Date: Fri, 14 Mar 2003 13:37:57 -0500
Message-ID: <8Opca.46$7E4.5301356_at_mantis.golden.net>


"programmer" <BROWNHIK_at_Syntegra.Bt.Co.Uk> wrote in message news:b4sch2$bk5$1_at_pheidippides.axion.bt.co.uk...
>
> "ben" <benc_at_email.arizona.edu> wrote in message
> news:71915a6e.0303132131.6480504c_at_posting.google.com...
> > 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.

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

Original text of this message