In Joe Celko's book "SQL for smarties", he blasts IDENTITY and other
Generator Functions as "a horrible, nonstandard, nonrelational
proprietary extension that should be avoided whenever possible" (p 63 if you
have the book)

I wrote Joe about this with this reply:

===========================
 >> You don't mention why or alternatives. I work with SQL server and the
topic of the @@IDENTITY variables comes up over and over. Some say use it,
others like yourself say avoid it. What arguments can I bring to the table
against using @@IDENTITY ? <<


Not Standard, not portable, and has a lot of weird side effects and
behaviors (scan the UseNet and other postings from people having problems
with it).

For fun, build a table with one column that is an IDENTITY column, then try
to insert, update and delete from it. You'll find out that it is not a
table because it does not behave like a table.

Conceptually, it is non-relational. If I insert the sequence {a, b, c}
into a table with the IDENTITY column, they get the numbering ((a,1),
(b,2), (c,3)), but if I insert the sequence {c, a, b} into a table with the
IDENTITY column, they get the numbering ((c,1), (a,2), (b,3)) instead.
Suddenly, ordering affects the attributes of an entity, in violation of a
basic relational principle that says we are using (unordered) sets.

For a data modeling viewpoint, why is a number associated at ransom with an
entity? What does it mean? It means that you could not think of a good
way to identify one entity from another and in desperation, you faked it!!
Timestamping rows at least marks an event.

--CELKO--

===========================
The question to the group is: "What are you using instead of IDENTITY?"
Perhaps you are using it and disagree with Joe Celko.  What are your
thoughts?

Tom




------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to