Rules for Selecting Primary key

by Jamal A
The article I read talks about how primary key individually identifies each record inside a table.
According to the article the main purpose of a primary key is to uniquely identify a row in a table
and relate records to additional data stored in other tables. The primary Key simply points between
interrelated records in different tables. The article talks about the rules that are necessary for
developers to follow when selecting a primary key for each table. For Instance: “The primary key must
uniquely identify each record. A record’s primary-key value can’t be null. The primary key value must
exist when the record is created. The primary key must remain stable. The primary key must be compact
and contain the fewest possible attributes. The primary key value can’t be changed”. These are some of
the important rules that are a must for developers to follow in order to have stable database.

This article is related to the class because it talks about the importance of using primary key.  I remember the example that we did in the class.   It was confusing to some extent and hard to comprehend the basics of primary key. I believe it would be a bad idea to create a record before knowing the primary key value.  I think its necessary to understand what qualifies as a primary key.  I learned a lot from this article, I did not know there are some rules to follow in order to have stable database.

The great primary-key debate | TechRepublic. (2002, March 22). TechRepublic – A Resource for IT Professionals. Retrieved January 29, 2012, from http://www.techrepublic.com/article/the-great-primary-key-debate/1045050

3 thoughts on “Rules for Selecting Primary key”

  1. I also wrote an informational article but it was on normalization. I think its important that we sometimes write on these kind of articles so the blog can also contain practical information that we can apply in this class. Its good to hear that developers have standardized rules in order to make databases user friendly.

  2. I also discussed primary keys in blog. I have to agree that it is important that we uniquely identify each record because that is what’s going to distinguish that record from others. I think the only thing I don’t like about primary keys is that if you’re not able to find one attribute that identifies a record uniquely, then you’re going to have to combine two attributes that can make the record unique. It’s hard just thinking about one thing that uniquely identifies a record, let alone two things!

  3. Jamal, nice input. It looks like you might have written the original post in Word and then copy and paste over, next time please clean up the format so it looks better on the blog site. Thanks.

Comments are closed.