Re: Cascade updates on primary keys..

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Samuel R. Neff (blinex_at_newsgroup.nospam)
Date: 12/17/04


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
>



Relevant Pages

  • Re: Table Structure ordering of columns
    ... you're using a compound Primary key? ... Now, when seperate databases are compined, there will never be a primary ... The DatabaseID is the Date and time in numeric format. ...
    (comp.databases.paradox)
  • Re: Using seek to find if a record exists
    ... a compound primary key cannot have Nulls in any of the fields, ... Using a Birthdate field as part of a primary key would not be a poor ...
    (comp.databases.ms-access)
  • Re: not allow for duplicate for a combination of two fields
    ... > I did what you said but the clientid on its own is not unique - it is ... Karl did not suggest a compound Primary Key. ... with its unique property set to yes. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Table Structure ordering of columns
    ... you're using a compound Primary key? ... But that same SKU may also exist at another location (another ... I identify each location with a unique 4 character value... ...
    (comp.databases.paradox)
  • Re: Cascade updates on primary keys..
    ... Define a single primary key field such as an ... > int identity field and use that as the fk to the other table. ... There's nothing "non-normalized" about a compound primary key. ...
    (microsoft.public.dotnet.languages.vb)