Super Key in DBMS

Super Key

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.

Super key

Super Key in DBMS

  • A super key 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
ID NAME PHONE AGE
66 John 7832973477 23
67 Judy 9732867464 21
68 Elena 8923826476 25
69 John 7326247844 23

The possible set of SuperKeys –

[ID]:

Asno 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

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription

Super Key in DBMS

  • A super key 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]:

Asno 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

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription