Re: choosing primary key datatype
From: Joe Celko (jcelko212_at_earthlink.net)
Date: 04/29/04
- Next message: Zach Wells: "Re: inserting more than one row"
- Previous message: Joe Celko: "Re: How to do an UPDATE without primary key column?"
- In reply to: ChrisB: "choosing primary key datatype"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Apr 2004 14:00:00 -0700
>> I was wondering if anyone might be willing to provide some insight
into the best datatype to use for primary keys in SQL Server 2000.<<
Why, we all know it is a Hebrew word that is exactly 19 characters long.
This is because Adam named all the entities in the Universe that way in
the Year 4004 BC. But you have to look very closely on the bottoms of
all entities to see it; it has gotten a little worn since God put it
there.
Sill answer? Sure; this was a silly question. **By definition** a
primary is a subset of attributes that uniquely identify an entity.
When you research your data model, you first look for industry
standards. Vehicles have VIN numbers, retail goods have UPC, books have
ISBN, etc.
>> From what I have read, in situations where uniqueness is required
across servers, GUID's work well. <<
This is how MS does replication. It has nothing to do with keys.
>> Would appreciate any opinions or links to good articles that discuss
this issue. <<
It just went out of print, but see if you can get a copy of my DATA &
DATABASES. I have chapters on the design of encoding schemes and the
natgure of keys.
There is no "magic, universal, one-sizes fits all" answer.
--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!
- Next message: Zach Wells: "Re: inserting more than one row"
- Previous message: Joe Celko: "Re: How to do an UPDATE without primary key column?"
- In reply to: ChrisB: "choosing primary key datatype"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|