Which of the following would NOT be a good primary key?
Student Number
Social Security Number
An e-mail address
A postcode
My answer is postcode, since people might have the same postcode.
WHat does other think?
Ask your teacher whether they meant 'primary key' in the data
modelling sense or the SQL-language meaning of PRIMARY KEY. If they
intended the SQL-language meaning then they are most likely pulling
your leg because it's implementation-specific -- e.g. for Jet it
determines physical ordering on disk -- and the choice is arbitrary
e.g. in Jet do you want to exploit clustering to optimize BETWEEN
queries in which case a postcode (assuming UK) would be favoured, or
optimize concurrency in which case Student Number would be favoured
(assuming values generated close together in valid-time are far apart
in terms of value e.g. a random INTEGER autonumber would probably
qualify but an incrementing INTEGER autonumber almost certainly would
not).
Note that Social Security Number (assuming US) can be duplicated;
further, an email address can be legitimately reassigned to another
person(s). And a postocode is the least vulnerable to identity theft
<g>.
Jamie.
--