Reputation: 940
It's a common question. Every table has atleast a primary key, so which type of data that primary key should be? Number only like 1/2/3/4 or we add some letters like A1/A2/A3 to distinguish which id belongs to which table?
Upvotes: 0
Views: 610
Reputation: 25526
If your key is a business key then the business needs should be the determining factor. Alphanumeric keys are often easier for people to use. Ideally a key should be familiar, simple and stable.
If the key is a surrogate then what's most important is the efficiency of generating and storing it. Most often it is just a sequential number.
Upvotes: 1