I am not sure if this question has been asked or not. At least I couldn't find it.
I am curious about a primary key in terms of efficiency with data searching and retrieval.
This is a hypothetical example...
I have a list of students with unique StudentID
(say 10 digits long, given that the school will never have that many students) and StudentName
(which is unique too).
Would it be better to use StudentID
as primary key or create a new field for primary key (may be 6 - 8 digits or composite of characters and numbers. i.e. ATC1002)?
If I use StudentName
as the primary key, will I see any retrieval performance degradation? If so, approximately how much in general? Are there any other factors which will have an impact on the selection of the primary field?