Skip to content

Chapter 2 of 8

Database Design and Normalization

Designing tables thoughtfully is essential to avoid anomalies when data is inserted, updated, or deleted. Normalization is the systematic process of organizing tables to reduce redundancy and eliminate unwanted dependencies. It is expressed as a series of progressively stricter rules called normal forms. The first normal form (1NF) requires that every cell hold a single atomic value, rejecting repeating groups or arrays inside a column. The second normal form (2NF) builds on 1NF by prohibiting partial dependencies on a composite primary key—every non-key column must depend on the entire key, not just part of it.

The third normal form (3NF) further requires that no non-key column depend transitively on the key through another non-key column. Boyce-Codd Normal Form (BCNF) tightens 3NF so that every determinant is a candidate key. There are higher normal forms (4NF and 5NF) addressing multi-valued and join dependencies, though they are encountered less frequently in everyday work. Throughout this hierarchy, the guiding principle is the same: the more normalized a schema, the less duplication it carries, but the more joins it tends to require when querying.

Sometimes performance demands outweigh the purity of normalization. Denormalization deliberately reintroduces redundancy—usually by combining tables or duplicating columns—to make reads faster. The tradeoff is increased storage and the need for careful write logic to keep duplicated data consistent. Most production databases strike a balance, normalizing for core transactional tables and selectively denormalizing for analytical or reporting workloads.

All chapters
  1. 1Foundations of SQL and Relational Databases
  2. 2Database Design and Normalization
  3. 3Querying Data: Clauses and Filtering
  4. 4Joins and Set Operations
  5. 5Aggregates and Window Functions
  6. 6Data Modification and Schema Management
  7. 7Programmable SQL and Advanced Features
  8. 8Performance, Transactions, and Operations

Drill it

Reading is not remembering. These come from the SQL Mastery deck:

Q

What is SQL?

Structured Query Language — a standardized language for managing relational databases.

Q

What is a relational database?

A database storing data in tables with relationships between them.

Q

What is RDBMS?

Relational Database Management System.

Q

Name common RDBMS.

PostgreSQL, MySQL, SQLite, Oracle, SQL Server.