Super Key in DBMS

Super Key in DBMS

In this article, we will learn about Super Key in DBMS.

Super key is a set of one or more attributes in a table that can uniquely identify each record present in a table.

Definition of Super Key

  • A superkey is a group of single or multiple keys which uniquely identifies rows in a table. 
  •  A Super key may have additional attributes not needed for unique identification.
Super Key in DBMS

Example of the super key

Consider the following table student

IDNAMEPHONEAGE
66John783297347723
67Judy973286746421
68Elena892382647625
69John732624784423

The possible set of SuperKeys –

[ID]:

As no two students will have the same Id, it will help to uniquely access the student details, hence it is a super key. Now we will identify all the Super Keys  present in the table that is the  set of attributes that will help to uniquely access a record

[NAME, ID]:

Even if more than one student has the same name then the combination name will help to recognize the record, as student id will break the tie and this is combination is a super key

[PHONE]:

As no two students will have the same phone number, a phone number will help to uniquely access the student details and hence phone number is a super key