25 votes 25 votes Let $R = (A, B, C, D, E, F)$ be a relation scheme with the following dependencies $C \rightarrow F, E \rightarrow A, EC \rightarrow D, A \rightarrow B $. Which one of the following is a key for $R$? CD EC AE AC Databases gate1999 databases database-normalization easy + – Kathleen asked Sep 23, 2014 Kathleen 4.1k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 31 votes 31 votes Answer: B EC is the key for R. Both E and C are not coming on the right hand side of any functional dependency. So, both of them must be present in any key. Now, with EC and the given FDs, we can derive all other attributes making EC a key. Rajarshi Sarkar answered May 24, 2015 • selected Jun 2, 2015 by Rajarshi Sarkar Rajarshi Sarkar comment Share Follow See all 2 Comments See all 2 2 Comments reply himanshud2611 commented Jan 6 reply Follow Share Is this necessary that any one of the key attribute(s) shouldn’t be on RHS? 0 votes 0 votes Rajsukh Mohanty commented Jan 21 reply Follow Share @himanshud2611 no it’s not necessary, but to form the key we must explicitly include them if they are not present in the RHS of any of the given FDs. Just notice that in these given FDs, the attributes that are not present in the RHS of any of the FDs can never be derived from the given FDs, therefore we must explicitly include them as part of the key. So whatever be the key, it must include the missing attributes. Here, C and E are absent in the RHS of all the FDs, so we must include them as part of the key. First check if only these two can derive all the other attributes (here they are), otherwise check for other combinations that include CE in it as well. 1 votes 1 votes Please log in or register to add a comment.