Re: Separate PK in Jxn Tbl?
Date: 27 Jan 2008 20:45:11 GMT
Rob <rmpsfdbs_at_gmail.com> wrote in
> 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