Re: Separate PK in Jxn Tbl?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Mon, 28 Jan 2008 20:15:35 -0400
Message-ID: <479e7027$0$4064$9a566e8b_at_news.aliant.net>


David W. Fenton wrote:

> JOG <jog_at_cs.nott.ac.uk> wrote in
> news:234b39d0-1c87-4565-81d8-69e7ffbee82c_at_b2g2000hsg.googlegroups.com
> : 
> 

>>On Jan 27, 8:39 pm, "David W. Fenton"
>><XXXuse..._at_dfenton.com.invalid> wrote:
>>
>>>JOG <j..._at_cs.nott.ac.uk> wrote
>>>innews:5afa9a80-f1c5-4ede-8095-1f4c0164417a_at_s12g2000prg.googlegrou
>>>ps.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.
>>>
>>>But it's repeating a huge amount of data,
>>
>>I'd think adding two new unecessary columns full of data is rather
>>adding redundancy too.
>
> But it's an efficient type of data

It's a complete waste, but it's an efficient type of waste. What nonsense!

[snip] Received on Tue Jan 29 2008 - 01:15:35 CET

Original text of this message