You probably know people who advocate single primary keys, and others who advocate composite primary keys, both passionately. In this article, I will try to present technical arguments whereby I believe that the use of single primary keys makes the development and maintenance of complex systems easier. I will be quite rational and I will support my considerations in respected authors like Eric Evans, Martin Fowler, besides my own experiences.

To begin, let’s imagine a (partial) scenario. An academic system, where we have the concept of person, contract, class, enrollment, course, subject, and others. A student may have a contract…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store