asked 196k views
5 votes
Consider the following schema for customer: (id, name, street, city, state, zip, phone), in which customers are uniquely determined by their name and phone or by their id. How many super keys are there for this relation? Justify your answer.

1 Answer

3 votes

Answer:

Super key is a set of attributes that uniquely identifies all attributes in a relation.Super keys are more than candidate key.

Step-by-step explanation:

For example in the given schema where

Customer: (id , name , street , city,state,zip,phone)

We have a relation we check super keys by following dependencies

Functional Dependencies Super Key

id YES

name YES

id , name -> street , city,state,zip,phone YES

id , street ->name , city,state,zip,phone YES

id,city ->name , street ,state,zip,phone YES

id,state ->name , street ,city,zip,phone YES

id,phone ->name , street ,state,zip,city YES

id , name , street YES

id , name , street , city YES

id , name , street , city,state YES

id , name , street , city,state,zip,phone YES

All these are uniquely identified

All these are super key but in reverse they are not super key such as

street , city,state,zip,phone->id , name No

answered
User Sumon Sarker
by
7.6k points