Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Super Key in RDBMS
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} |
Advertisements
