SQL Server › Normalization

What is database normalization, and why is it an important concept in schema design?

Beginner

Answer

Database normalization is the process of organizing tables and columns to reduce data duplication and improve data integrity, typically by breaking down a large table into smaller, related tables, which helps prevent inconsistencies that can occur when the same piece of information is stored in multiple places and only some of those copies get updated.
-- Unnormalized: customer info repeated in every order row
-- Normalized: customer info stored once in a separate table
CREATE TABLE Customers (CustomerId INT PRIMARY KEY, Name VARCHAR(100), Email VARCHAR(100));
CREATE TABLE Orders (OrderId INT PRIMARY KEY, CustomerId INT, Amount DECIMAL(10,2));
Real-world example A company redesigns its orders table to reference a separate customers table instead of repeating the customer's name and email on every single order, ensuring a customer's information only needs to be updated in one place.

Common follow-ups: What problems can arise from an unnormalized database design?;Does normalization always improve query performance?