Super Key in RDBMS

RDBMSDatabaseMySQL

Super Key is an attribute (or a set of attributes) that uniquely identify a tuple i.e. an entity in entity set.

It is a superset of Candidate Key, since Candidate Keys are selected from super key.

Example

Let us see an example −

<Student>

Student_ID

Student_Enroll

Student_Name

Student_Email

S02
4545
Dave
ddd@gmail.com
S34
4541
Jack
jjj@gmail.com
S22
4555
Mark
mmm@gmail.com


The following are the super keys for the above table −

{Student_ID}
{Student_Enroll}
{Student_Email}
{Student_ID, Student_Enroll}
{Studet_ID, Student_Name}
{Student_ID, Student_Email}
{Student_Name, Student_Enroll}
{Student_ID, Student_Enroll, Student_Name}
{Student_ID, Student_Enroll, Student_Email}
{Student_ID, Student_Enroll, Student_Name, Student_Email}

The following would be the candidate key from the above −

{Student_ID}
{Student_Enroll}
{Student_Email}
raja
Published on 04-Jul-2018 11:39:31
Advertisements