Database Normalization
Normalization is the process of organizing a database to reduce data redundancy and improve data integrity. It involves dividing tables and defining relationships to minimize duplication.
Normalization is the process of organizing a database to reduce data redundancy and improve data integrity. It involves dividing tables and defining relationships to minimize duplication.
-- Unnormalized: orders table storing customer info
-- id | customer_name | customer_email | product | price
-- 1 | Alice | a@x.com | Laptop | 999
-- 2 | Alice | a@x.com | Mouse | 29
-- Problems: update Alice's email in two places
-- Fix: separate customers table + FK
Ask: if the same data appears in multiple rows, it probably belongs in its own table.