I'm studying Database Design and I am in trouble with the Candidate Keys and the Functional Dependencies.
I have these Functional Dependences:
B → CEF
G → AD
B → DG
GA → B
My idea is: Since GA is the only one attribute that is not functionally determined by anyone, then, by using Armstrong's Axioms, I see that GA determines all attribute of the Schema S.
So there is only one Candidate Key: GA.
Am I right? Thanks in advance.
Best Answer
The relation with the above functional dependencies has two different candidate keys: B and G.
You can verify this if you compute the closure of both to see if it contains all the attributes:
While for G:
No other set of attributes is a candidate key, since the only other attribute on the left side is
A
, butGA
is determined byG
, so it can be eliminated from that dependency.Actually a canonical cover of the original set of dependencies is: