Ad Code

Candidate key,Super key ,Minimal Super key


What is the difference between candidate key and supper key with an example, What does mean minimal super key

Super key is a set of one or more attributes which put together enables us to identify uniquely an entity in the entity set. For example there is a relation called STUDENT(Stu_Id, Name, Age, Class). In this relation Name and Stu_Id form a super key for the relation STUDENT. But, name alone cannot act as a superkey since two persons could have the same name.
Whereas if we talk about candidate then it’s a super key actually for which no subset is a superkey is called candidate key. In the previous example, Stu_Id is a candidate key, as it is minimal, and uniquely identifies a student entity.
Reactions

Post a Comment

0 Comments