categories.database Basic

What Is Database Normalization? Differences Between 1NF, 2NF, and 3NF

AI Practice

Database Normalization

Purpose

Eliminate data redundancy; reduce update, insert, and delete anomalies

First Normal Form (1NF)

  • Each column must hold atomic values (no repeating groups or arrays)
  • Example: Split phone1, phone2, phone3 into a separate phones table

Second Normal Form (2NF)

  • Satisfies 1NF
  • Non-key columns must depend on the entire composite primary key (no partial dependencies)
  • Example: OrderItem(OrderID, ProductID, ProductName) — ProductName only depends on ProductID; extract it

Third Normal Form (3NF)

  • Satisfies 2NF
  • No transitive dependencies between non-key columns
  • Example: Employee(ID, DeptID, DeptName) — DeptName depends on DeptID, not EmployeeID; extract it

Denormalization

Intentionally introducing redundancy for query performance (e.g., caching computed results)

  • Normalization → less redundancy, better for writes
  • Denormalization → more redundancy, better for reads (fewer JOINs)

Interview bonus: OLTP systems typically use 3NF; OLAP systems often use denormalized Star Schema or Snowflake Schema for analytical query performance.

✦ AI Mock Interview

Type your answer and get instant AI feedback

Sign in to use AI scoring

Copyright © 2026 Wood All Rights Reserved · FE Interview Hub