What's the main point of Normalization?
I mean if a normal form is not in 2NF, it is because of partial dependency i.e. a non key attribute is dependent on a part of a candidate key. So, let's say, for a relation R(A,B,C) with FDs:
AB->C, B->C
Clearly, AB is the candidate key and B->C
is the partial dependency.
Solution: Decompose the relation such that (B,C) forms a new relation with B as the key.
Now, if a relation is not in 3NF, it is because a non key attribute is dependent on another non key attribute i.e. to say if FDs for a relation R(A,B,C) are:
A->B,B->C
Clearly, A is the key and B->C shows transitive dependency, so not in 3NF.
Solution: Decompose the relation such that (B,C) forms a new relation with B as the key.
So, what's the exact difference? I mean, why such a marked distinction? Essentially in both of the cases the action is same. Decompose the relation using the dependency where the determinant (B here) is either PART of a key or not. Why have separate terms like partial dependency or transitive dependency? Why not just see, if there exists a dependency wherein a non prime attribute is determined by a something which is NOT a candidate key( no matter whether it is a partial key or another non prime attribute )
Why can't we implement a method like this:
- 1 NF -- having all elements in the atomic form
- X NF -- if there's any
dependency of the form
non_key -> non_prime_attribute(s)
, decompose the relation with one of the new relation having this particular "non_key" as the key with those non_prime_attributes. - BCNF : Where for all the dependencies of the form X->Y, X is a superkey?
Can we have such NF condition format? Does it combine all the conditions?