Natural or artificial primary key? Using the Mifrenz children’s email application as a case study
TL;DRAbstract
The choice of primary key (PK) for a database relation (table) is an important concept that students need to grasp. The standard process that is taught to students, centres on the concept of looking at the data requirements and choosing a PK based on the natural data. Yet, there is much debate in industry with respect to the use of natural or artificial data for a primary key with the consensus seeming to favour the use of an artificial key. This debate is unfortunately not reflected in the peer reviewed academic literature. This seems to direct the lecturer to a “do as I say, not what ‘they’ do” approach. This paper gives a worked example of designing a database for an email application (Mifrenz), that the author was able to use to demonstrate to students an example where the use of natural data seemed to be the most appropriate solution.
Chat with Paper
AI Agents for this Paper
The choice of primary key (PK) for a database relation (table) is an important concept that students need to grasp. The standard process that is taught to students, centres on the concept of looking at the data requirements and choosing a PK based on the natural data. Yet, there is much debate in industry with respect to the use of natural or artificial data for a primary key with the consensus seeming to favour the use of an artificial key. This debate is unfortunately not reflected in the peer reviewed academic literature. This seems to direct the lecturer to a “do as I say, not what ‘they’ do” approach. This paper gives a worked example of designing a database for an email application (Mifrenz), that the author was able to use to demonstrate to students an example where the use of natural data seemed to be the most appropriate solution.
Keywords
Chat
Click to start Chat