Re: Separate PK in Jxn Tbl?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sun, 27 Jan 2008 18:18:16 -0400
Message-ID: <479d032e$0$4074$9a566e8b_at_news.aliant.net>


David W. Fenton wrote:

> JOG <jog_at_cs.nott.ac.uk> wrote in
> news:5afa9a80-f1c5-4ede-8095-1f4c0164417a_at_s12g2000prg.googlegroups.co
> m: 
> 

>>No probs, although off the top of my head its gonna be a bit
>>contrived. With an artificial key:
>>
>>Marriages {id, husband, wife, date}
>>Kids_from_Marriage {from_id, name, birth}
>>
>>A query that asks "fetch me all the children whose mother is x"
>>obviously requires an equijoin, matching Marriages.id and
>>Kids.from_id. However with the original natural keys:
>>
>>Marriages {id, husband, wife, date}
>>Kids_from_Marriage {mother, father, name, birth}
>>
>>The same query is a simple select. That certainly seems a lot less
>>complicated to me ;)
> 
> Assuming you've got some form of CASCADE UPDATE on your enforced
> relationship, that will work. 

You mean "Assuming that CASCADE UPDATE is needed..." Modern dbmses all meet the requirement in any case causing me to wonder what the hell you thought your point might have been.

> But it's repeating a huge amount of data

Again, you confuse physical and logical.

[further ramblings snipped] Received on Sun Jan 27 2008 - 23:18:16 CET

Original text of this message