SQL & PostgreSQLInterview preparation
Foundation·Concept·2 min read

What are 1NF, 2NF and 3NF?

Practice this question

Definition:

Normalization organizes tables so each fact is stored in an appropriate place and changes do not create inconsistent copies. The first three normal forms progressively address repeating groups, dependence on only part of a key, and indirect dependence through other non-key facts. This reduces update, insert and delete anomalies.

Key points:

  • 1NF: no repeating groups; values fit the chosen field structure.

  • 2NF: non-key fields depend on the whole candidate key, not only part of it.

  • 3NF: non-key facts do not depend on other non-key facts; separate department details from employees.

  • Store department details in a department table rather than copying the department phone number onto every employee.

Interview point:

  • Explain a concrete anomaly first; introduce denormalization only as a deliberate read-performance trade-off with a consistency plan.
Adapted from 05_SQL_POSTGRESQL.md · “What are 1NF, 2NF and 3NF?”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.