Database Practice: Normalization (1NF, 2NF, 3NF)

Database Practice Questions: Normalization

Use the unnormalized/violating table schemas and sample data below to practice database normalization. Copy the setup into your SQL editor first.

Schema and Sample Data (Unnormalized Tables)

Normalization Exercises

1. First Normal Form (1NF): Examine employee_skills_unnormalized. It violates 1NF because the skills column contains multiple values in a single cell. Redesign this into 1NF by writing the new table structures and showing sample rows.

2. Second Normal Form (2NF): Examine order_items_unnormalized which has a composite primary key (order_id, product_id). Identify which columns violate 2NF due to partial dependency, and split the table into separate tables that satisfy 2NF.

3. Third Normal Form (3NF): Examine employee_departments_unnormalized. Identify the transitive dependency causing a violation of 3NF, and decompose the table into multiple tables so that all non-key columns depend only on the primary key.