Database Normalization Interview Questions
What Interviewers Are Testing
Normalization interview questions test your ability to design databases that eliminate redundancy and maintain data integrity through the systematic application of normal forms.
Interview Questions & Model Answers
Explain the normal forms: 1NF, 2NF, 3NF.
1NF (First Normal Form): Each column must have atomic (single, indivisible) values. No repeating groups or arrays. Every row must be unique (primary key). 2NF (Second Normal Form): Must be in 1NF, plus every non-key attribute must depend on the ENTIRE primary key — no partial dependencies (relevant for composite primary keys). 3NF (Third Normal Form): Must be in 2NF, plus no transitive dependencies — non-key attributes must depend only on the primary key, not on other non-key attributes.
-- 3NF violation: dept_name depends on dept_id (not emp_id) CREATE TABLE employees_bad ( emp_id INT PRIMARY KEY, emp_name VARCHAR(100), dept_id INT, dept_name VARCHAR(100) -- transitive dependency: emp_id → dept_id → dept_name ); -- 3NF compliant: separate departments table CREATE TABLE employees (emp_id INT PRIMARY KEY, emp_name VARCHAR(100), dept_id INT); CREATE TABLE departments (dept_id INT PRIMARY KEY, dept_name VARCHAR(100));
Potential Follow-up Questions:
- What is BCNF and how does it differ from 3NF?
What are update anomalies and how does normalization prevent them?
Update anomalies are data integrity problems in denormalized tables: Insertion anomaly — cannot insert data without including unnecessary other data (can't add a department without an employee). Update anomaly — changing data requires updating multiple rows (department name stored in every employee row). Deletion anomaly — deleting one type of data accidentally deletes other data. Normalization eliminates these by ensuring each fact is stored in exactly one place.
Potential Follow-up Questions:
- Give an example of a deletion anomaly in a denormalized table.
When would you denormalize a database?
Denormalize when read performance is critical and write performance is secondary — typically in reporting, analytics, and data warehouse workloads. A denormalized schema reduces JOIN count, improving read speed. Trade-offs: data redundancy, higher storage, risk of update anomalies. Common denormalization techniques: adding redundant columns to avoid joins, pre-aggregating data, creating summary tables.
Potential Follow-up Questions:
- What is a star schema in data warehousing?
Frequently Asked Questions
What normalization questions are asked in database interviews?
What is the difference between 2NF and 3NF?
Related Interview Topics
Practice Answering Live
Use our Interview Arena to practice SQL challenges under real interview conditions. Free.