If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#5
|
|||
|
|||
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. -- |
Thread Tools | |
Display Modes | |
|
|