I understand that in order to fulfill 2.NF, attributes must not be dependent on part of the key. Now, the question is, let's say we have a relation R with a set of attributes {A,B,C,D,E,F,G,H,I,J,K} and its functional dependencies {A→GH, B→IJ, C→A, F→B, FC→DK, K→E} and the candidate keys C AND F. Do these FDs like C→A violate 2.NF because it is not fully functionally dependent on BOTH F AND C ?
So the question is
Do attributes in functional dependencies need to be dependent on the whole set of candidate keys – in this case FC ? Or is the dependency on one of the keys sufficient to fulfill 2.NF ?
Best Answer
If all your dependencies are those you have shown:
{A->GH, B->IJ, C->A, F->B, FC->DK, K->E}
then you have come to the wrong conclusion.Your only candidate key is
CF
. TheC
andF
are not candidate keys on their own.Therefore, the
F->B
dependency (and theC->A
as well) means that the relation violates 2NF.For the other question, if you had for example these dependencies:
where the candidate keys are
BC
andAF
, then again theF -> DE
would mean that the relation violates 2NF. To be in 2NF would mean that there is no dependency on any part of any candidate key.