- Reference to the super key, you said that we can make Student Id and Student name as super key but why we are adding student name in super key? When we can I identify with student ID then why there is need to add student name? And in which situations we need to add extra attributes in super key.
- What will happen if I will remove student name in the super key? That will be still super key or not? If not then why ? Because still we can recognize the uniqe record by using Student ID then why that will not be supper key.
Its upto us to chose any super key as primary key. If you make super key of just two attributes of your choice like "Student ID, Student Address" then this combination of two attributes will also be a super key. Yes it will remain super key, as its all about our choice. Please consider the following very suitable example:
Example: Suppose we have an Entity Type EMPLOYEE having attributes Emp ID, Name, Address, Salary, Commission, Joining Date, Designation etc. Now here we suppose "Emp ID" as super key, now if we consider any combination of Emp ID with any other attribute of EMPLOYEE entity type, the combination will also be a super key. For example, "Emp ID, Name", "Emp ID, Name, Address" and "Joining Date, Emp ID" and many others all are super keys.
0 Comments
Please add nice comments or answer ....