2NF: Remove Partial Dependencies
R = {A, B, C, D, E, F, G, H, I, J}
includes partial dependencies.
D and E depend only on A, F depends only on B, G, H, I and J don't depend on the key (directly) at all.
R0 = {A, B, C}
R1 = {A, D, E, I, J}
R2 = {B, F, G, H}
R0, R1, and R2 contain no partial dependencies (or repeating groups) so they are 2NF. However R1 and R2 are still an issue, because they contain transitive dependencies.
3NF: Remove Transitive Dependencies
I and J depend on D, not on the key of R1. Therefore you need to further normalize R1 as follows:
R1 = {A, D, E, I, J}
R1a = {A, D, E}
R1b = {D, I, J}
Similarly, G and H depend only on F so R2 must be decomposed as follows:
R2 = {B, F, G, H}
R2a = {B, F}
R2b = {F, G, H}
Now all of your remaining relations (R0, R1a, R1b, R2a, R2b) are devoid of repeating groups, partial dependencies and transitive dependencies. That means your relations are in 3NF.
When you are looking at an relation that hasn't been normalized and a series of dependencies, you can often normalize by inspection just by recognizing what your primary keys are going to be. Any attribute or combination of attributes that functionally determine other attributes are going to end up as primary keys. Once you've got your primary keys defined, you just need to figure out which non-key attributes go with each key. This is obvious from the statement of what your functional dependencies are.
The mistake is in your understanding of transitive dependency. From wikipedia: Transitive dependency
In mathematics, a transitive dependency is a functional dependency which holds by virtue of transitivity. A transitive dependency can occur only in a relation that has three or more attributes. Let A, B, and C designate three distinct attributes (or distinct collections of attributes) in the relation. Suppose all three of the following conditions hold:
1. A → B
2. It is not the case that B → A
3. B → C
Then the functional dependency A → C (which follows from 1 and 3 by the axiom of transitivity) is a transitive dependency.
In your case though, (2) does not hold:
1. U → T -- correct
2. It is not the case that T → U -- wrong
3. T → V -- correct
Therefore {V}
is NOT transitively dependent on {U}
.
Best Answer
Every textbook I've ever seen gives you one or more algorithms you can use to determine every possible candidate key for R{ABCDEFG}. (It can be a fairly laborious and time-consuming job.) Based on the FDs you provided, I think R{ABCDEFG} has only one candidate key, {AC}.
Loosely speaking, for a relation to be in 3NF, it must be in 2NF and have no transitive dependencies. For a relation to be in 2NF, it must be in 1NF and have no partial key dependencies.
Therefore, R{ABCDEFG} is not in 2NF (or 3NF) based on the FDs you provided.