Database MCQ

1:

Let R is a relation schema, R(A, B, C, D) and F = {A —> B, B --> C, C —> A) is the set of functional dependency. Determine the key of relation ?

A.

A

B.

B

C.

C

D.

D

 

Answer : D

Explanation :

Rule to find out the key in relation :-

  • Key ---> Rest of Attributes
    1. As Key determies rest of the attributes 
    2. Key must include all attributes but can not be on RHS of any functional dependency i.e Only fields on RHS are determined. 
    3. An undetermined field must be in the key.
    4.  REST must include all attributes but  NOT on LHS  They don't determine anything  so they can not be part of key.
    5. If field is not in ANY FD, it must be part of the key

Now considering these 5 points we get D as Key.

Jyoti said: (10:51am on Tuesday 22nd October 2013)
A superkey is a set of attributes whose closure contains all the attributes. A candidate key = a minimal superkey and primary key is selected candidate key here A , B , C all closure have all arttibutes(ABC) only D is left.hence we have AD,BD,CD as candidate keys and anyone of them can be a primary key

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.