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…