If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > question - super keys

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-11, 18:34
donan donan is offline
Registered User
 
Join Date: Nov 2011
Posts: 5
question - super keys

Hi again

Let's say I have a table with the following attributes:

(CustomerID, CustomerName, CustomerEmail, CustomerBirthday, CustomerCountry)

Obviously the CustomerID is the primary key, and also, CustomerEmail is a candidate key.

But, can someone clarify to me what are the super keys of each entity of the table?
Also, what would be the dependencies of each entity of the table? :/


Thank you

Last edited by donan; 12-01-11 at 19:57.
Reply With Quote
  #2 (permalink)  
Old 12-08-11, 21:21
caseyvandenaard caseyvandenaard is offline
Registered User
 
Join Date: Dec 2011
Posts: 6
CustomerID AND CustomerEmail are both Candidate keys. (or minimal superkeys).

A superkey is any attribute (or collection of attributes) of a table that would ensure that each tuple (or row) in the table is uniquely identified.
The trivial superkey is all the attributes of the table (since you expect no two rows in the table to be exactly the same).

CustomerID is therefore a minimal superkey (ie. candidate key) since no two entries will have same customerID.
From the two candidate keys (CustomerID and CustomerEmail) you picked customerID to be the primary key.

Now all you have to do is look up the customerID and you are presented with their name, email, birthday and country. In other words all those things are dependent on customerID. (or the customerID determines the customerName).
However since customerEmail is also a candidate key, all these things are also dependent on customerEmail.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On