Normalization

A systematic approach to decide whether a particular relation is in good form. Helps ensure correctness and maintainability. But might degrade query performance.

Normalization theory was introduced by Edgar F. Codd, the father of relational databases, in 1970.

“Good” Form?

A relation is in good form when it has these properties:

  • easier to understand and to extend
  • clear keys that uniquely identify tuples
  • appropriate atomic domains for attributes
  • functional dependencies that do not introduce partial or transitive redundancy
  • constraints captured by a suitable normal form (1NF, 2NF, 3NF, BCNF, etc.) given the application needs.

A database is in a good form when all of its relations are in good form.

Normal Forms

Normal forms prevent anomalies.

Several normal forms are defined, each builds on the previous one and defines a set of rules. Consecutive normal forms ensure the relations are in a better form.

Each normal form defines a set of conditions. If one of the conditions are violated, the relation is said to be violate the normal form.

If a relation violates nnth normal form, it is violating iith normal forms where i>ni \gt n.

Normal forms as nested regions 1NF 2NF 3NF BCNF 4NF 5NF
Nested regions: every 5NF relation is also in 4NF, BCNF, 3NF, 2NF and 1NF

1st Normal Form (1NF)

If all the below conditions are met, the relation is in 1NF:

  • Row order is not used to convey information.
  • Domain of any attribute contains values of a single type, not multiple types.
    Not possible in relational DBMS.
  • It has a primary key.
  • It has no repeating groups.

Violates 1NF

Student
StudentID Name Phones
1 Ann 071, 077
2 Bob 070

Phones holds a repeating group

Decomposed

Student
StudentIDName
1Ann
2Bob
StudentPhone
StudentIDPhone
1071
1077
2070

Underlined columns form the primary key.

A relation with a multi-valued Phones attribute decomposed into 2 relations in 1NF

2nd Normal Form (2NF)

If all the below conditions are met, the relation is in 2NF:

  • It’s in 1NF
  • All non-key attributes must depend on the entire primary key.

If not, the relation must be decomposed into smaller relations.

Violates 2NF

Enrollment
StudentID CourseID StudentName Grade
1 DB Ann A
1 OS Ann B
2 DB Bob C

StudentName depends on StudentID only (partial dependency)

Decomposed

Student
StudentIDStudentName
1Ann
2Bob
Enrollment
StudentIDCourseIDGrade
1DBA
1OSB
2DBC

Underlined columns form the primary key.

A partial dependency on part of the key removed by moving StudentName into its own relation

3rd Normal Form (3NF)

If all the below conditions are met, the relation is in 3NF:

  • It’s in 2NF
  • All non-key attributes must depend only on the entire primary key.

Allows key attributes to depend on non-key attributes.

Aims to remove data redundancy.

Violates 3NF

Student
StudentID Dept DeptHead
1 CS Dr. Lee
2 CS Dr. Lee
3 EE Dr. Kim

StudentID → Dept → DeptHead (transitive dependency)

Decomposed

Student
StudentIDDept
1CS
2CS
3EE
Department
DeptDeptHead
CSDr. Lee
EEDr. Kim

Underlined columns form the primary key.

A transitive dependency removed by moving DeptHead into a Department relation

Boyce-Codd Normal Form (BCNF)

Slightly stronger than 3NF. Can be thought of as 3.5NF.

If all the below conditions are met, the relation is in BCNF:

  • It’s in 3NF
  • All key attributes must depend on and only on the entire primary key.

Violates BCNF

Teaching
Student Course Instructor
Ann DB Lee
Bob DB Lee
Ann OS Kim
Cathy DB Park

Instructor → Course, but Instructor is not a key. A course can have several instructors, so Course does not determine Instructor

Decomposed

Takes
StudentInstructor
AnnLee
BobLee
AnnKim
CathyPark
Assigned
InstructorCourse
LeeDB
KimOS
ParkDB

Underlined columns form the primary key.

A relation in 3NF but not BCNF, decomposed along the dependency Instructor → Course

Fix for BCNF Violation

Suppose relation RR and a non-trivial functional dependency A→BA \rightarrow B cause a violation of BCNF.

RR is decomposed into:

  • (A∪B)(A \cup B)
  • R−(B−A)R - (B - A)

Why BCNF Is the Usual Target

Most designs stop at BCNF, or 3NF when dependency preservation is needed, even though 4NF and 5NF exist.

  • Functional dependencies are the most common constraint.
    BCNF removes the redundancy they cause.
  • Multivalued and join dependencies are rare.
    They appear only when independent facts are stored together in 1 relation.
  • A careful ER model already avoids them.
    Each independent multivalued fact becomes its own entity or relationship, so the resulting tables are usually in 4NF already.
  • Join dependencies are hard to spot.
    They are not visible from the real-world constraints the way functional dependencies are.
  • Every extra decomposition adds joins.
    Queries get slower for a small gain in redundancy.

4th Normal Form (4NF)

If all the below conditions are met, the relation is in 4NF:

If not, the relation must be decomposed into smaller relations.

Violates 4NF

Employee
Employee Skill Language
Ann SQL EN
Ann SQL FR
Ann Java EN
Ann Java FR

Employee ↠ Skill and Employee ↠ Language are independent

Decomposed

EmployeeSkill
EmployeeSkill
AnnSQL
AnnJava
EmployeeLanguage
EmployeeLanguage
AnnEN
AnnFR

Underlined columns form the primary key.

Two independent multivalued facts about an employee stored separately instead of as every combination

5th Normal Form (5NF)

If all the below conditions are met, the relation is in 5NF:

  • It’s in 4NF
  • It cannot be describable as the logical result of joining some other tables together.

Violates 5NF

SupplierPartProject
Supplier Part Project
S1 P1 J2
S1 P2 J1
S2 P1 J1
S1 P1 J1

Equals the join of its 3 projections

Decomposed

SupplierPart
SupplierPart
S1P1
S1P2
S2P1
PartProject
PartProject
P1J2
P2J1
P1J1
ProjectSupplier
ProjectSupplier
J2S1
J1S1
J1S2

Underlined columns form the primary key.

A relation that is exactly the join of its 3 binary projections, split into those projections
Written by October 10, 2026 4 min read
Was this helpful?