The Purpose of Primary Keys{4}

by Jasmine C
The article I read discussed primary keys.  The article states that primary keys are derived from candidate keys.  The focus of this key is to uniquely identify a row in a table.  As a rule of thumb, a candidate key should “contain the fewest number of attributes possible to identify rows individually and uniquely” (Schraml).  If a table does contain any composite keys then a surrogate key is created.  The purpose of this key it to basically create a data item that would not exist.  A problem that was stated in the article is that many people confuse the concept that a primary key is a logical and not a physical concept. When designers implement the physical aspect, an example of a mistake would be that they add extra columns onto the primary key. As a result, the logical primary key no longer exists which can eventually lead to your database system not operating properly.

This article relates to class because just this week we were discussing primary keys and how they need to uniquely identify and entity.  This can be confusing for beginners because what one might think uniquely identifies an entity may not, and as a result, your database is not going to operate the way you want it to. We can also have a combination of two attributes that can uniquely identify an entity and they both will be used as primary keys.  Hopefully, when we eventually learn about the physical concept, we will not mess up our logical primary keys.

I liked this article because I can see how easy it is to confuse yourself as to what qualifies as a primary key.  We have to make sure that we are careful when we define what our primary keys are because if we are not, then we are going to have some serious problems in the long run.   We always need to remember that whatever attribute can uniquely identify an entity is probably the primary key.


Schraml, T. (2010). Keys are keys and indexes are indexes. Database Trends & Applications24(1), 30. Retrieved January 27, 2012, from