vendredi 2 janvier 2015

Should I set document version field to be part of a primary key


Should I set document version as a primary key I am working on a document management system, and I have these two tables representing part of the whole tables.


enter image description here


On the DocumentVersion table I have set the primary key to be (version + documentID) . so can anyone advice if this is a recommended approach where the documentID is of type int while the version is of type decimal(5,2) ? or it is better if I create a new field and set it as the primary key inside the DocumentVersion table? Thanks





Aucun commentaire:

Enregistrer un commentaire