Super Key Vs Primary Key [message #9300] |
Sun, 02 November 2003 10:09 |
ja
Messages: 9 Registered: May 2001
|
Junior Member |
|
|
Its Seem tome that both are same.But I have seen in one book that it was defined differently.Can please any body explainthe difference.
|
|
|
|
Re: Super Key Vs Primary Key [message #9390 is a reply to message #9300] |
Fri, 07 November 2003 12:27 |
Hussain
Messages: 2 Registered: November 2003
|
Junior Member |
|
|
A primary key is a minimal superkey. For ex, consider a table X(car_name, vin_no, car_city, ...).
Here, car_name and vin_no can act as a key. At the same time vin_no itself alone can act as a key. So, car_name + vin_no can be called as a super key while vin_no is the primary key (in other words, a minimal super key).
Thus, a primary key can be a super key but not vice versa.
|
|
|