The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+15 votes
1.2k views

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 (111k points) | 1.2k views

4 Answers

+25 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.
answered by Boss (11.6k points)
edited by
0
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.
+9
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
0
Thanks a lot... :)
+2
With H even E & F  cannot be derived from anything else so E,F,H need to be there in key!!
+1
Really awesome way of finding keys. Must watch. Check this
0
Sir EFH must be in the key
+1
$\{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
+3 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 (8.7k points)
+2 votes

this is my answer.

answered by Boss (13.3k points)
0
m confused between commas in LHS part .{E,F,H} why we are taking as whole {EFH} ?
0
CAN WE APPLY UNION RULE FOR COMBINING {E,F,H}
0
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.
0 votes

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 (213 points)
Answer:

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

44,149 questions
49,639 answers
163,313 comments
65,807 users