DBMS slides 📂 Functional Dependencies & Normalization · 2 of 4 33 min read

Functional Dependencies Explained — Full, Partial & Transitive

A 14-slide visual guide to functional dependencies — the foundation of normalization. It defines X→Y, prime vs non-prime and trivial vs non-trivial, then classifies every dependency as full (desirable), partial (breaks 2NF) or transitive (breaks 3NF) using a decision flowchart, worked examples and animated dependency-arrow diagrams.

Functional Dependencies — Full, Partial & Transitive

When one value always determines another, a functional dependency exists. Learn to read X → Y, classify every dependency by its left side, and see exactly which ones block 2NF and 3NF.
X → Y Full Partial (2NF) Transitive (3NF)

Press Next → or use ← → arrow keys

Section 01

The Story — The Supermarket Barcode

One scan, one answer — every time
Scan a barcode at checkout and it instantly reveals the product's name and price. Scan the same barcode again and you get the same result — always. That's a functional dependency: when one value consistently determines another, barcode → (name, price).
🎯
The Notation & the Test

In X → Y, X is the determinant and Y the dependent. The test: if any two rows share the same X but differ on Y, the dependency fails.

Section 02

The Vocabulary You Need

👑
Prime attribute
Belongs to at least one candidate key — e.g. Order_ID, Item_ID in an order-line table.
📄
Non-prime attribute
Belongs to no candidate key — the descriptive columns like Qty, Item_Name, Dept_Location.
🪞
Trivial vs Non-Trivial
Trivial: Y ⊆ X (like {A,B}→A). Non-trivial: Y not inside X — these are what normalization cares about.
🧭
Everything Starts Here

Every FD type is defined in terms of prime vs non-prime attributes — identify them correctly first, and classification becomes automatic.

Section 04

Two Example Relations

ORDER_ITEM · PK {Order_ID, Item_ID}

OrderItemQtyItem_Name
O1P12Pen
O1P25Notebook
O2P13Pen

Composite key → can host partial dependencies.

EMPLOYEE · PK {Emp_ID}

EmpENameDeptDept_Loc
E1RajD1Block A
E2SaraD2Block B
E3AmitD1Block A

Single key → can host transitive dependencies.

🔁
Spot the Redundancy

"Pen" repeats for every order of P1; "Block A" repeats for every D1 employee. Those repeats are exactly what partial and transitive dependencies cause.

Section 03

Classify Any Dependency — The Flowchart

Is Y ⊆ X ? TRIVIAL yes Is X the whole key? no FULL ✓ yes Is X part of a key? no PARTIAL · breaks 2NF yes X non-prime → Y via non-keyTRANSITIVE · breaks 3NF no
💡
The One-Question Shortcut

Just ask "what's on the left side?" — a whole key → full; part of a key → partial; a non-key attribute → transitive.

Section 05

Full Functional Dependency ✓

A non-prime attribute depends on the entire composite key — remove any part and the determination breaks.

Order_ID Item_ID the whole key together Qty
🎯
Neither Half Alone Is Enough

Order_ID alone can't fix Qty (O1 has 2 and 5). Item_ID alone can't either (P1 has 2 and 3). Only the full pair {Order_ID, Item_ID} → Qty works — exactly what 2NF wants.

Section 06

Partial Functional Dependency — Breaks 2NF

A non-prime attribute depends on only part of a composite key. Only possible when the key has multiple attributes.

Order_ID Item_ID only part of the key Item_Name
✂️
Redundancy That Violates 2NF

Item_ID → Item_Name: P1 is always "Pen" regardless of the order. Item_Name depends on half the key, so "Pen" is repeated on every matching row — a partial dependency that breaks 2NF.

Section 07

Transitive Functional Dependency — Breaks 3NF

A non-prime attribute depends on another non-prime attribute through a middle step. "To find Raj's location, first find his department; the department gives the location."

Emp_IDkey Dept_IDnon-prime Dept_Locationnon-prime Emp_ID → Dept_Location (indirect / transitive)
🔗
Non-Key → Non-Key = 3NF Trouble

Emp_ID → Dept_ID → Dept_Location. The location exists because of the department, not the employee — so "Block A" repeats for every D1 employee. A transitive dependency that breaks 3NF.

Section 08

Impact on Normalization

1NFatomic values 2NFremove partial deps 3NFremove transitive deps
DependencyProblemBlocks
FullNone — desirable
PartialPart-key data repeated2NF
TransitiveNon-key data repeated via a middle attribute3NF
Section 09

Quick Classification Drills

DependencyTypeWhyStatus
{Order_ID, Item_ID} → QtyFullwhole composite key✅ Healthy
Item_ID → Item_NamePartialpart of composite keyBreaks 2NF
Emp_ID → Dept_LocationTransitivenon-key via another non-keyBreaks 3NF
{Emp_ID, Date} → Emp_IDTrivialdependent is inside determinantIgnore
🔍
Read the Left Side First

Whole key → full · part of a key → partial · a non-key attribute → transitive · dependent already inside → trivial. One glance at the determinant usually settles it.

Section 10

Full vs Partial vs Transitive

FeatureFullPartialTransitive
Left side iswhole keypart of keynon-key attribute
Needs composite keyYesYesNo
Goes via a middle attrNoNoYes
Desirable?YesNoNo
Blocks2NF3NF
Example{O,Item}→QtyItem→Item_NameEmp→Dept_Loc
Section 11

Three Common Mistakes

🔑
Partial on a single key
Partial dependencies need a composite key. A single-attribute key has no "part" — it's automatically 2NF-compliant.
🔗
Key-to-key called transitive
Transitive means non-key → non-key. If the middle attribute is itself a candidate key, it's not the 3NF-breaking kind.
📸
Proving FDs from sample rows
Sample rows can disprove a dependency but never prove one. FDs come from business rules, not snapshots.
🧠
Semantics, Not Snapshots

A table that happens to show one name per barcode doesn't prove the FD — only the rule "a barcode always means one product" does. A single counterexample row, however, is enough to kill it.

Section 12

Golden Rules of Functional Dependencies

🏆 NON-NEGOTIABLE RULES
1
Meaning: X → Y means identical X always produces identical Y — one mismatched row disproves it.
2
Classify by the left side: whole key = full, part of key = partial, non-key = transitive.
3
Requirements: partial needs a composite key; transitive needs three or more attributes.
4
Normalization map: remove partial dependencies for 2NF; remove transitive dependencies for 3NF.
5
Prime attributes first: every definition rests on correctly identifying prime vs non-prime attributes.
6
Design goal: full dependencies are the goal — non-prime attributes should depend on the whole key and nothing else.
FINAL

The Foundation of Normalization

X→YThe core notation
FullWhole key · desirable
PartialPart key · breaks 2NF
TransitiveVia non-key · breaks 3NF
🎯
The Foundation Is Set

You can now read X → Y, tell prime from non-prime, and classify any dependency as full, partial or transitive — which is precisely the diagnosis normalization acts on. Next up: Normalization (1NF → 2NF → 3NF → BCNF), where partial dependencies are split out for 2NF and transitive ones for 3NF.

🧠
One Sentence to Remember

Read the left side: whole key is full (good), part of a key is partial (breaks 2NF), a non-key chaining to another non-key is transitive (breaks 3NF).

🔗 End of tutorial · Press to review, or click Restart