Reflect upon the desirable characteristics of a primary key


Database Applications Discussion

Reflect upon the desirable characteristics of a primary key (below) that were presented in this week's lecture. (150-300 words) Choose one characteristic and discuss why you believe it would be undesirable if this were not a characteristic of a primary key. Please do not repeat (or re-word) the thoughts of another student. Respond to both discusion posts shown below the lecure. (50-100 words each)

Lecure on primary keys

The primary key of a table is how we identify data in the table, so it is especially important to choose a proper primary key. There are several characteristics that are considered desirable in a primary key.

First, a primary key should be unique. It can never have a duplicate. This should be obvious since we are using the keys for identification of specific information. This is also one reason why we typically don't consider names good choices for primary keys, since two or more people can have the same name.

Next, a primary key should be stable, meaning it should never change. This is another reason why names are not considered good primary keys. Names do change: marriage, divorce, and adoption are three circumstances that readily spring to mind that might cause a name change.

Additionally a primary key should be minimal. It should use the fewest number of attributes possible. Also, it should be accessible, meaning it's available as soon as the data is created.

Furthermore, a primary key should be "factless." It should contain no information that has meaning. Meeting this characteristic helps ensure the key is security-compliant, because if the key is factless it will not contain any personally identifiable information such Social Security Numbers.

When taken together, these characteristics point to the desirability of a numeric key for the primary key. Because of this we often use a surrogate key for the primary key. We can generate a numeric surrogate key with each record, which results in the primary key meeting all the desirability characteristics. While there are occasional instances where a surrogate key is not the best choice, for the purposes of this class it will be a good idea to get into the habit of using a surrogate key for the primary key.

John's Discusion Post

When it comes to a primary key the main thing that was mentioned was that if the information could be changed not to use it as a primary key. It also mentioned that a good primary key should be numerical like an employee identification number since that is a self generated number that isn't utilizing personal information like the last 4 digits of a social security number. I think the one characteristic that is important is keeping the number stable. Ensuring that the one thing that will tie in all the information for that particular person or item will never change and will access all data from all fields in different databases as well.

Tony's Discusion Post

Within the book a primary key is a column value used to identify each row therefore the values in this column must be unique. So if I understand this right the primary key is set up to help identify the information that you put into that column. when putting in that information you want that primary key to be unique to you so you can protect your information. so creating a unquie primary key can help you protect your information. If this is correct let me know that I am on the right track with this primary key stuff.

Solution Preview :

Prepared by a verified Expert
Database Management System: Reflect upon the desirable characteristics of a primary key
Reference No:- TGS01472383

Now Priced at $40 (50% Discount)

Recommended (91%)

Rated (4.3/5)