Database Management System (DBMS) / Normalization in DBMS

3NF

πŸ“˜ What is 3NF (Third Normal Form)?

A table is in 3NF if:

  1. It is already in 2NF, and

  2. No non-prime attribute is transitively dependent on the primary key


πŸ” What is Transitive Dependency?

A transitive dependency exists when:

A β†’ B  and  B β†’ C  β‡’  A β†’ C

πŸ“Œ In database terms: A non-key attribute depends on another non-key attribute, instead of depending directly on the primary key.


🧾 Example (Table in 2NF, but not in 3NF):

πŸŽ“ Student_Detail Table:

Student_ID

Name

Dept_ID

Dept_Name

101

Swati

D1

CSE

102

Ravi

D2

IT

βœ… Primary Key = Student_ID

❌ Dept_Name depends on Dept_ID

❌ Dept_ID depends on Student_ID

➑️ So, Dept_Name depends transitively on Student_ID

➑️ Violates 3NF


🎯 Why 3NF is Important?

  • Removes transitive dependencies

  • Prevents update anomalies

  • Makes schema cleaner and easier to maintain


🧠 Key Concepts Recap:

Concept

In 3NF?

Atomic values

βœ… Yes (from 1NF)

No partial dependencies

βœ… Yes (from 2NF)

No transitive dependencies

βœ… Yes

All attributes depend only on PK

βœ… Yes


⚠️ When is 3NF Not Enough?

If multiple candidate keys exist or non-trivial FDs don’t originate from candidate keys β€” you may need to apply BCNF (Boyce-Codd Normal Form).