I need to design a table and am bit confused to choosing the primary key field.Say for excample am creating a table Student with the following columns
- ID - Unique Key and Auto increament by 1.
- RegistrationNumber - Numbers are unique across the table
- Name
- RegistrationDate
Now my question is: From the above table we can see both ID and RegistrationNumber are unique, and RegistrationNumber servers the business purpose but ID is used for referring this table with others. So out of these two columns which one I can make as a Primary key.
From the business context Registration number should be the primary key for the table, but since am referring the Id in other tables event I can choose the ID as a PK..
Please suggest me which one should be appropriate.
Thanks in advance.