Identity field usage

  • Whereas Celko seems to be more Standard oriented .

  • *seems* to be... you're not sure yet?!

  • There are really two issues here. 

    Issue #1 - Natural vs. surrogate keys

    Issue #2 - The proper way to generate surrogate keys.

    As I have read Celko, he doesn't argue against the use of surrogate keys per se.  He doesn't like the proprietary nature of IDENTITY columns.  The problem is that Microsoft hasn't implemented the SQL standard function to generate a sequence of integers, called a SEQUENCE oddly enough, so for those of use in SQL Server land, there isn't much choice.  You can either use IDENTITY or you can use some sort of MAX() +1, or you can setup a table that holds the current value and update it as you use the value, etc...  The problem with the available alternatives comes down to one thing; performance.

    Arguing against the use of surrogate keys, in my opinion, is at least as myopic as using a surrogate key in every table. 

    /*****************

    If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek

    *****************/

  • I'll have to use a lifeline on that one .

Viewing 4 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic. Login to reply