Theory
The rule under the rules
Last lesson you felt why normalization matters. But to actually do it, split correctly, you need one precise idea: which column decides which.
If you know a student's roll number, you know their name, the roll number determines the name. That is a functional dependency, and every normalization rule is built on spotting them.
There is also a sneaky kind, transitive dependency, that causes hidden redundancy, and a small rulebook, Armstrong's axioms, for reasoning about them. This lesson is the machinery behind the normal forms.
Theory
Knowing one thing tells you another
Tell me your PIN code and I can tell you your city, the pincode determines the city (one pincode, one city). But tell me your city and I cannot tell you your pincode (a city has many). So the dependency has a direction: pincode determines city, not the reverse. Functional dependency is exactly this: knowing the value on the left tells you exactly one value on the right.
Theory
Functional dependency, formally
A functional dependency is written X to Y, read 'X determines Y': for each value of X there is exactly one value of Y.
roll_no to name (knowing the roll number gives one name)
X is the determinant (the deciding side). The whole point of a primary key is that it determines every other column in its row.
A partial dependency is when a column depends on only part of a composite key, a problem 2NF will fix. Getting the direction right is everything: roll_no to name, never name to roll_no (names repeat).
Theory
Transitive dependency: the hidden chain
A transitive dependency is a chain through a non-key attribute:
X to Y and Y to Z, so X to Z indirectly
Example in Meera's orders: order_id to customer_id (each order has one customer) and customer_id to customer_city (each customer has one city). So order_id to customer_city transitively, the city depends on the order only through the customer.
This is bad: the city gets stored redundantly on every order. Third normal form (3NF) exists precisely to remove transitive dependencies.
Quiz
In a table: roll_no to department, and department to hod (head of department). What kind of dependency links roll_no to hod?
- Transitive dependency, roll_no determines hod only THROUGH department
- A direct functional dependency with no issues
- A partial dependency on a composite key
- No dependency at all
Show the answer
Transitive dependency, roll_no determines hod only THROUGH department
roll_no determines department, and department determines hod, so roll_no determines hod indirectly, via the non-key attribute department: a transitive dependency. This causes the HOD to be stored redundantly for every student in the department. 3NF removes it by splitting department and its HOD into their own table. Spotting the A to B to C chain is the core skill 3NF questions test.
Think first
Armstrong's three axioms
Armstrong's axioms are the rulebook for reasoning about dependencies. The three primary ones are Reflexivity, Augmentation, and Transitivity. Can you guess what Transitivity says, given you just used it above?
Show the answer
Transitivity: if X to Y and Y to Z, then X to Z, exactly the roll_no to department to hod chain. The other two: Reflexivity (a set determines any subset of itself, trivially, if Y is part of X then X to Y) and Augmentation (if X to Y, you can add the same column to both sides: XZ to YZ). Together these three (plus derived rules like union and decomposition) are sound and complete: they can infer every valid functional dependency. They are the formal engine behind normalization.
Watch out
Where marks leak
Getting FD direction wrong: X to Y means X determines Y (the determinant is on the left). Confusing transitive (X to Y to Z through a non-key attribute) with a plain dependency, transitive is the specific chain 3NF removes. And when asked, name Armstrong's three primary axioms: reflexivity, augmentation, transitivity. Mixing these up, or reversing a dependency's arrow, is where marks quietly vanish.
Theory
Now the normal forms make sense
You are fully armed. Partial dependency is the enemy of 2NF; transitive dependency is the enemy of 3NF; and every split you make is justified by a functional dependency. The next lesson walks 1NF to BCNF, and you will see each form as removing one specific kind of bad dependency you now recognise. This theory is the reason the normal forms are not arbitrary. Next: 1NF, 2NF, 3NF, BCNF.
Summary
Key takeaways
- A functional dependency X to Y means X DETERMINES Y (one Y for each X); X is the determinant, on the left.
- The primary key functionally determines every other column in its row.
- Partial dependency: a column depends on only part of a composite key (2NF's target).
- Transitive dependency: X to Y to Z through a non-key attribute, so X to Z indirectly (3NF's target).
- Armstrong's axioms (reflexivity, augmentation, transitivity) are the sound, complete rulebook for inferring FDs.
- Memory hook: pincode determines city (one direction); watch for the A to B to C hidden chain.