Re: Separate PK in Jxn Tbl?

From: David W. Fenton <XXXusenet_at_dfenton.com.invalid>
Date: 27 Jan 2008 20:45:11 GMT
Message-ID: <Xns9A32A0513A5CBf99a49ed1d0c49c5bbb2_at_64.209.0.89>


Rob <rmpsfdbs_at_gmail.com> wrote in
news:0a65204e-068c-4e77-900c-319439ab6707_at_d70g2000hsb.googlegroups.co m:

> I do know that the debate over relationship representations has
> been going on for years, neither side giving any ground. Some
> aspects of it are never addressed. For example, making the two
> foreign keys in a junction table a composite PRIMARY key prohibits
> NULL values from either key, but declaring a separate surrogate
> primary key together with a UNIQUE constraint on the
> two-foreign-key-composite-key does allow NULL values for either
> (or both!). This can be useful for representing unrelated entity
> tuples, either childless parents or orphans.

Er, why go to all that trouble? You can represent the same childless parents by simply omitting a record in the junction table.

-- 
David W. Fenton                  http://www.dfenton.com/ 
usenet at dfenton dot com    http://www.dfenton.com/DFA/
Received on Sun Jan 27 2008 - 21:45:11 CET

Original text of this message