DBMS · Normalization

1NF, 2NF and 3NF explained

Easynormalization1nf2nf3nf

Interview question

What are the first three normal forms?

How to answer

The short answer

Each normal form builds on the one before it.

First normal form (1NF): every column holds a single value, and there are no repeating groups. A column that stores "Maths, Physics" breaks 1NF. The fix is one row per subject, or a separate table.

Second normal form (2NF): the table is in 1NF, and every non-key column depends on the whole , not just part of it. This matters only when the key has more than one column. In an order_items table with the key (order_id, product_id), a column product_name depends only on product_id. That is a partial dependency. Move product details into a products table.

(3NF): the table is in 2NF, and no non-key column depends on another non-key column. If a table stores employee_id, department_id and department_name, then department_name depends on department_id, not on the employee. That is a transitive dependency. Move it into a departments table.

A short way to remember all three:

> Every non-key column must depend on the key (1NF), the whole key (2NF), and nothing but the key (3NF).

Output
Before (not in 3NF)
employee_id | department_id | department_name

After
employees(employee_id, department_id)
departments(department_id, department_name)

BCNF is a slightly stricter version of 3NF. It matters when a table has several overlapping candidate keys, which is rare in practice.

Most real systems stop at 3NF. If an interviewer asks why, the answer is that going further adds joins and complexity for very little extra protection.