Re: problem using identity column as primary key

From: Joe Celko (joe.celko_at_northface.edu)
Date: 02/24/04


Date: Tue, 24 Feb 2004 08:55:32 -0800


>> Identity is a great way of generating a primary key ... as the only
purpose of the PK is to have a unique value. <<

You are dangerous.

1) It cannot generate a key by definition. It is the PHYSICAL state of
the hardware that holds your database at a particular point in time.

2) The purpose of any key is to uniquely identify the entities in the
data model in a way that can be verified in the reality the model
represents. Uniqueness is necessary but not sufficient.

3) It is not even self-validating since there is no check digit or
syntax. That makes it lousy as just a unique number, since it has a
high error rate.

--CELKO--
 ===========================
 Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Definitions of Software and Database
    ... Well is a database not merely a physical implementation of an abstract ... defining the purpose of that specific type of software. ...
    (comp.databases.theory)
  • Re: Definitions of Software and Database
    ... Well is a database not merely a physical implementation of an abstract ... defining the purpose of that specific type of software. ...
    (comp.databases.theory)
  • Re: Definitions of Software and Database
    ... defining the purpose of that specific type of software. ... Leif B. Kristensen wrote: ...
    (comp.databases.theory)
  • Re: Is there a god?
    ... reality is not mechanical but personal ... Both naturalists and theistic idealists generally agree, I think, that our ... in our nature, in the purpose of our being, it is the very joy and ... But some theists make a slightly different error. ...
    (uk.religion.christian)
  • Re: "Virtuality" on Fox tonite?
    ... The purpose is a trip to another star. ... The reality show was an additional ... inner rim of the spinning habitat?) ... Any drive based on blowing up bombs isn't going to ...
    (rec.arts.sf.tv)