Re: Separate PK in Jxn Tbl?

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

Rob <> wrote in 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         
usenet at dfenton dot com
Received on Sun Jan 27 2008 - 21:45:11 CET

Original text of this message