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. Because I got to "know" that exposing primary key to user is not a good practice. So, does that means that we should have an internal ID(primary key) that is used for database and another column with running number that is display to user?
Aucun commentaire:
Enregistrer un commentaire