Quantcast
Viewing latest article 4
Browse Latest Browse All 31

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.

Image may be NSFW.
Clik here to view.
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


Viewing latest article 4
Browse Latest Browse All 31

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>