Re: problem using identity column as primary key

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 02/25/04


Date: Wed, 25 Feb 2004 08:58:51 -0600

It is, but it makes for interesting situations with cascading that goes
large numbers of tables. My rule is that every piece of data is modifiable
in only one place, and that change will be reflected in only one place in
the system. I also like the fact that if I change a key structure the
change only effects my database code in one place (and the UI in only one
location if proper OO techniques are used).

I certainly do not think there is anything wrong with using natural keys for
primary keys, but I don't think there is anything wrong with using
artificial values as surrogate keys either, as long as they are backed up by
natural keys.

-- 
----------------------------------------------------------------------------
-----------
Louis Davidson (drsql@hotmail.com)
Compass Technology Management
Pro SQL Server 2000 Database Design
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are
interested in consulting services.  All other replies will be ignored :)
"J. M. De Moor" <nospam@spamlessobjectpac.com> wrote in message
news:erJSxwz%23DHA.2552@TK2MSFTNGP09.phx.gbl...
> Petrik
>
> >
> > One problem with natural keys that hasn't come up in this discussion
> > is the fact that it is very difficult to find a natual key that is
> > quaranteed not to change.
>
> That's why some put ON UPDATE CASCADE in their DDL, right?
>
> Joe De Moor
>
>


Relevant Pages

  • Re: Data Primary key vs. Artificial (Autonumber) primary key
    ... "natural" keys, I use unique indexes. ... the message about having table constraints on the candidate keys ... but I would wager than most users in the 'Autonumber PK' camp put ... worse) with multi-column natural keys (I have no objection on ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Fixing up structure with primary, natural, surrogate, etc.
    ... So, I re-did most of my tables, creating natural keys, setting unique ... If you already have the unique index, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Access 2010 beta - Publish to Sharepoint
    ... talking only about junction tables and the seriousness of the ... The ability of having compound keys is also good. ... Multicolumn indices are indeed convenient when natural keys are ...
    (comp.databases.ms-access)
  • Re: "Smart" Product Codes
    ... Pass four parameters (4 keys) and create the ... using the natural keys would make things less complex. ... > composite of those four natural keys represents the natural key for the ... > calculated column would make that a lot less painful. ...
    (microsoft.public.sqlserver.programming)
  • Re: Why use a composite PK ever?
    ... such as here in Denmark where each citizen ... operator simply enters incorrect birthdate ... So after such cases I'm very sceptical about natural keys as primary ...
    (comp.databases)