Log In
17 votes

Consider a relation scheme $R = (A, B, C, D, E, H)$ on which the following functional dependencies hold: {$A \rightarrow B$, $BC \rightarrow D$, $E \rightarrow C$, $D \rightarrow A$}. What are the candidate keys R?

  1. $AE, BE$
  2. $AE, BE, DE$
  3. $AEH, BEH, BCH$
  4. $AEH, BEH, DEH$
in Databases
edited by

2 Answers

30 votes
Best answer

using the given functional dependencies and looking at the dependent attributes, E and H are not dependent on any. So, they must be part of any candidate key. So, only option is D. If we see the FD's, adding A, B or D to EH do form candidate keys.

selected by
8 votes

Answer :  OPTION D
You can directly find the candidate key using two rules or you can say necessary attributes. 
An Attribute A is said to be a necessary attribute if 

(a)  A occurs only in L.H.S. (left hand side ) of the FD's(functional dependencies) in F  and/or
(b)  A is an Attribute in relation, But A doses not occur either in L.H.S. or R.H.S. of any FD in F. 

In other words, Necessary attributes never occur in the RHS of any FD in F. 

Here we can directly see, both attribute E and H not occur in RHS of any FDs. So, both of are necessary part of a candidate key. 


Related questions

24 votes
5 answers
Which one of the following statements about normal forms is $\text{FALSE}?$ $\text{BCNF}$ is stricter than $3NF$ Lossless, dependency-preserving decomposition into $3NF$ is always possible Lossless, dependency-preserving decomposition into $\text{BCNF}$ is always possible Any relation with two attributes is in $\text{BCNF}$
asked Sep 22, 2014 in Databases Kathleen 5k views
49 votes
6 answers
The relation book (title,price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list? select title from book as B where (select count(*) from book as T where T.price ... four most expensive books Title of the fifth most inexpensive book Title of the fifth most expensive book Titles of the five most expensive books
asked Sep 22, 2014 in Databases Kathleen 12.2k views
19 votes
4 answers
A table has fields $Fl, F2, F3, F4, F5$ with the following functional dependencies $F1 → F3$ $F2→ F4$ $(F1 . F2) → F5$ In terms of Normalization, this table is in $1NF$ $2NF$ $3NF$ None of these
asked Nov 3, 2014 in Databases Ishrat Jahan 2.6k views
18 votes
2 answers
Consider a direct mapped cache of size $32$ $KB$ with block size $32$ $bytes$. The $CPU$ generates $32$ $bit$ addresses. The number of bits needed for cache indexing and the number of tag bits are respectively, $10, 17$ $10, 22$ $15, 17$ $5, 17$
asked Sep 22, 2014 in CO and Architecture Kathleen 5.6k views