Friday, 22 April 2016

What is Candidate key, Alternate key and Composite key ?


Candidate key
 : Any attribute that is uniquely identify a row in a table
We select one of the candidate key as Primary key.

Alternate keys : All candidate keys which are not chosen as primary key.

Composite key : The key which uniquely identify the rows of the table and which is made up of more than one attribute.

Summary
Generally a candidate key becomes the primary key of the table.
If the table has more than one candidate key one of them will become the primary key and the rest are called alternate keys.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.