The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+17 votes

Consider the relation scheme $R = (E, F, G, H, I, J, K, L, M, N)$ and the set of functional dependencies $$\left\{ \{E, F \} \to \{G\}, \{F\} \to \{I, J\}, \{E, H\} \to \{K, L\}, \\ \{K\} \to \{M\}, \{L\} \to \{N\}\right\}$$ on $R$. What is the key for $R$?

  1. $\{E, F\}$
  2. $\{E, F, H\}$
  3. $\{E, F, H, K, L\}$
  4. $\{E\}$
asked in Databases by Veteran (96.1k points) | 1.5k views
In GO pdf answer of this question is not complete. Please fix the issue.

4 Answers

+28 votes
Best answer
Since $E,F,H$ cannot be derived from anything else $E,F,H$ should be there in key.

Using Find $\{EFH\}^+,$ it contains all the attributes of the relation.

Hence, it is key.

Correct Answer: $B$
answered by Boss (11.1k points)
edited by
Question is about KEY. Its not mentioned that it should be a candidate key or a super key. Then how to determine what is the Answer, because option C is also a KEY coz it contains EFH too.
if it is mentioned as key then its only candidate keys / primary key

a super key is any set of attribute that uniquely determines a tuple

whereas a key or candidate key is minimal super key

so option C is superkey. but set of attributes is not minimal

hence not a key
Thanks a lot... :)
With H even E & F  cannot be derived from anything else so E,F,H need to be there in key!!
Really awesome way of finding keys. Must watch. Check this
Sir EFH must be in the key
$\{E,F,H\}$ can be determine every attributes of the relation, but $\{E,F,H\}$ cannot be determined by any other attributes,

hence, $\{E,F,H\}$ is the primary key
+6 votes

A) {EF}+ = {EFGIJ} ≠ R(The given relation)

B) {EFH}+ = {EFGHIJKLMN} = R (Correct since each member of the
                                    given relation is determined)

C) {EFHKL}+ = {EFGHIJKLMN} = R (Not correct although each member
                                of the given relation can be determined
                                but it is not minimal, since by the definition
                                of Candidate key it should be minimal Super Key)

 D) {E}+ = {E} ≠ R

answered by Loyal (9.3k points)
+3 votes

this is my answer.

answered by Boss (12.8k points)
m confused between commas in LHS part .{E,F,H} why we are taking as whole {EFH} ?
my solution is based on given option that's why I take EFH as the combination. take a closer set of EFH you get all the attribute.
+1 vote

Any question related to functional dependencies can be solved by a simple method:

just look at the right side of all functional dependencies and note which attributes are not present at the right-hand side. Then the candidate key is definitely going to contain them because they can't be derived from the other.Now find out the closure and check the options.

If They are talking about key, they mean to say CANDIDATE KEY

for this question:- EFH is not present at right side so definitely the candidate key is going to contain them.

closure  (EFH) =  EFGHIJKLMN

So The correct option is B.

answered by (297 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,540 questions
54,100 answers
71,007 users