Re: Cascade updates on primary keys..
From: Samuel R. Neff (blinex_at_newsgroup.nospam)
Date: 12/17/04
- Next message: WJ: "VarBinary ?"
- Previous message: David Browne: "Re: Cascade updates on primary keys.."
- In reply to: David Browne: "Re: Cascade updates on primary keys.."
- Next in thread: David Browne: "Re: Cascade updates on primary keys.."
- Reply: David Browne: "Re: Cascade updates on primary keys.."
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 17 Dec 2004 14:33:05 -0500
When the primary key is used as a foreign key in another table, then
the use of a compound primary key is both wasteful and
non-normalized--it duplicates data unnecessarily.
Sam
On Fri, 17 Dec 2004 13:20:12 -0600, "David Browne" <davidbaxterbrowne
no potted meat@hotmail.com> wrote:
>
>"Samuel R. Neff" <blinex@newsgroup.nospam> wrote in message
>news:fc76s0ltjsfq6g9hdl15gq4v356mm5j2ke@4ax.com...
>>
>> You shouldn't link tables on multiple fields--it's a non-normalized
>> and waisteful design. Define a single primary key field such as an
>> int identity field and use that as the fk to the other table.
>
>1) There's nothing "non-normalized" about a compound primary key.
>
>2) There's nothing "wasteful" about a compound primary key.
>
>But,
>
>3) Primary keys should be immutable, and should never use cascade updates.
>
>So if you must update a compound key, you will need to introduce a surrogate
>primary key (eg int identity primary key).
>
>
>David
>
- Next message: WJ: "VarBinary ?"
- Previous message: David Browne: "Re: Cascade updates on primary keys.."
- In reply to: David Browne: "Re: Cascade updates on primary keys.."
- Next in thread: David Browne: "Re: Cascade updates on primary keys.."
- Reply: David Browne: "Re: Cascade updates on primary keys.."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|