lundi 22 décembre 2014

Should running number be separated column from primary key in database?


I have questions that blogged my mind on separating member number and member id.


Suppose that we have a database with member id primary key of Guid type. Then, normally, when we view the profile (on web page), we will display a Profile/100001 instead of Profile/{Guid-id}. So, in this case, we would have another column for member number which is separated from member id.


Now, assume that we have a case where Member ID is int datatype, and the running number of Member No is incremented 1 each time start from 100001, should we separate the member ID (primary key) from member number in this case?


This question is focus on web application database design.





Aucun commentaire:

Enregistrer un commentaire