Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2011

    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.

  2. #2
    Join Date
    Dec 2011
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts