Ad Code

Candidate key and Composite key


Kindly explain in detail about candidate key. 


Please give example of Candidate with in composite key form



A Candidate Key can be any column or a combination of columns that can qualify as unique key in database. There can be multiple Candidate Keys in one table. Each Candidate Key can qualify as Primary Key. If we have a composite super key and if we take any attribute out of it and remaining part is not a super key anymore then that composite super key is also a candidate key since it is minimal super key.

Example: Suppose we have an Entity Type EMPLOYEE having attributes Emp ID, Name, Address, Salary, Commission, Joining Date, Designation etc. Now here we suppose "Emp ID, Name" as composite super key and this composite super key is not a candidate key, since if we remove the EmpID attribute from this combination, Name attribute alone is not able to identify the instances uniquely.
Reactions

Post a Comment

0 Comments