Logo
Published on

Higher Normal Forms in DBMS – Understanding 4NF and 5NF with Examples

Higher Normal Forms in DBMS – Understanding 4NF and 5NF with Examples

As your database design grows more complex, so do the relationships among attributes. Higher Normal FormsFourth Normal Form (4NF) and Fifth Normal Form (5NF) — help resolve advanced issues like multi-valued dependencies and join dependencies, ensuring data remains consistent, non-redundant, and easier to maintain.

🔁 Fourth Normal Form (4NF)

📘 Definition

A table is in 4NF if:

  • It is already in Boyce-Codd Normal Form (BCNF)
  • It contains no multi-valued dependencies

A multi-valued dependency (MVD) occurs when one attribute determines multiple independent values of another attribute.

🧪 Example: Student_Activities Table

Student_IDSportClub
101SoccerDrama
101BasketballDrama
101SoccerMusic
102TennisScience

Dependencies:

  • Student_ID →→ Sport
  • Student_ID →→ Club

Both attributes vary independently, creating a multi-valued dependency, which violates 4NF.

🛠 Converting to 4NF

Split the table into two independent tables:

✅ Student_Sport Table

Student_IDSport
101Soccer
101Basketball
102Tennis

✅ Student_Club Table

Student_IDClub
101Drama
101Music
102Science

These tables now eliminate multi-valued dependencies, meeting the requirements of 4NF.

🧩 Fifth Normal Form (5NF)

📘 Definition

A table is in 5NF (also known as Projection-Join Normal Form - PJNF) if:

  • It is in 4NF
  • It has no join dependencies, i.e., it cannot be further decomposed without loss of data

🧪 Example: Course_Instructor_Student Table

Course_IDInstructorStudent_ID
C101Dr. Smith101
C101Dr. Smith102
C102Dr. Brown103
C102Dr. Brown104

Each course can have multiple students and multiple instructors. But instructors and students are not related to each other directly — only through the course.

🛠 Converting to 5NF

Break it down into three projections:

✅ Course_Instructor Table

Course_IDInstructor
C101Dr. Smith
C102Dr. Brown

✅ Course_Student Table

Course_IDStudent_ID
C101101
C101102
C102103
C102104

✅ Instructor_Student Table

InstructorStudent_ID
Dr. Smith101
Dr. Smith102
Dr. Brown103
Dr. Brown104

Now, joining these three tables reconstructs the original data without redundancy, satisfying 5NF.

🧠 Why Higher Normal Forms Matter

Normal FormPurposeEliminates
4NFResolves multi-valued dependenciesIndependent relationships
5NFResolves join dependenciesRedundant combinations

✅ Final Thoughts

By applying 4NF and 5NF, your database becomes:

  • 🔁 Free of complex redundancies
  • 🧱 Structured for scalability
  • 🔐 Resilient to anomalies

These higher normal forms are essential for enterprise-level systems with intricate data relationships and multiple many-to-many connections.

📚 What We’ve Covered in the Series

  1. 1NF – Atomicity, no repeating groups
  2. 2NF – Eliminate partial dependencies
  3. 3NF – Eliminate transitive dependencies
  4. BCNF – Superkey-based dependencies
  5. 4NF & 5NF – Multi-valued and join dependencies

🎯 Summary Table

Normal FormFocusRemoves
1NFAtomic valuesRepeating groups
2NFFull functional dependencyPartial dependencies
3NFTransitive dependencyIndirect attribute dependency
BCNFSuperkey dependencyOverlooked 3NF anomalies
4NFMulti-valued dependencyIndependent multivalues
5NFJoin dependencyRedundant joins