I don't know if my Databases teacher was terribly bad but I clearly remember her telling us that there were two types of primary keys: Artificial and Natural, artificial are like the ones you mention, auto increment values or random keys, however there are also natural keys and they are parts of the data that can be used as primary key because they are unique for sure.
Here in my country for example every citizen has an ID number that is unique country-wide (something like the SSN in the US) so I often use it as primary key for tables involving people like Customers tables. Am I wrong?
Discussion on:
Message 1 of 41

































