View Single Post
  #11  
Old August 6th, 2007, 09:05 AM posted to microsoft.public.access.tablesdbdesign
Jamie Collins
external usenet poster
 
Posts: 1,705
Default PK - To AutoNumber or Not To AutoNumber - That is the Question! :-

On Aug 3, 2:29 am, John W. Vinson
wrote:
A primary key candidate should meet three criteria: it should be unique within
the table; it should (preferably) be stable, not something that will get
edited after entry; and (ideally) it should be reasonably small (8 bytes is
the size of an Autonumber so that's a benchmark).


Do you mean PRIMARY KEY (SQL keywords in uppercase)? If so you can
add: cannot include the NULL value; what special meaning is implied by
such designation (hint: clustering on compact of file).

If you mean primary key (general meaning in lowercase) then you've
missed out some important ones (by accident or design?): trusted
source (hint: you don't want to get into the situation where your mdb
is the trusted source of a key and you must expose your autonumber
value to database users), familiarity, validation (e.g. a check digit
can reduce keying errors), verifiability (e.g. an ISBN can be verified
by looking on the back cover, on Amazon, etc), simplicity (contrast
'The United Kingdom of Great Britain and Northern Ireland' with ISO
4217 alpah-3 country code = 'GBP'). Also note that 'stable' (not
subject to frequent change) is not the same as 'immutable' (not
subject to change).

Jamie.

--