Interview Q&A / SQL & DBMS

IntermediateIn-depth2 min readUpdated 30 Sept 2026

What is normalization? Explain 1NF, 2NF and 3NF.

SHORT ANSWER

Normalization organises tables so each fact is stored once. 1NF means single values per cell, 2NF removes columns that depend on only part of a composite key, and 3NF removes columns that depend on other non-key columns.

Explain it simply

Imagine a messy notebook where every time a student enrols in a course, you write the student's name, phone number, the course name and the teacher's phone number again. If the teacher changes their number, you must fix it on many pages and will probably miss some. Normalization is the habit of keeping each fact in one place and pointing to it, so updates are easy and data does not contradict itself.

Example

Start with one table: enrolments(student_id, student_name, course_id, course_name, teacher, teacher_phone, phones).

  • 1NF (atomic values): a cell like phones = "98..., 97..." holds two values. Move phone numbers into their own rows or table so every cell has one value.
  • 2NF (whole key): the key is (student_id, course_id). student_name depends only on student_id and course_name only on course_id, which is only part of the key. Move them to students(student_id, student_name) and courses(course_id, course_name, teacher).
  • 3NF (no transitive dependency): in courses, teacher_phone depends on teacher, not on course_id. Move it to teachers(teacher, teacher_phone).

The final tables: students, courses, teachers and enrolments(student_id, course_id).

How it works

Each normal form removes one kind of repeated information. Every non-key column should depend on "the key, the whole key, and nothing but the key". Foreign keys link the smaller tables so you can join them back together when you need the combined view.

Real-world use

  • Transactional systems (banking, orders, college records) are normalised to avoid update mistakes.
  • Reporting and analytics tables are often deliberately denormalised for faster reads; that is a trade-off, not an error.

Common mistakes

  • Over-normalising tiny lookup data and making every query a five-table join.
  • Denormalising for speed without a plan to keep copies in sync.
  • Confusing 2NF with 3NF: 2NF is about part of a composite key, 3NF is about one non-key column depending on another.

What to say in the interview

"Normalization reduces redundancy so each fact lives in one place, which prevents update, insert and delete anomalies. First normal form means atomic values and no repeating groups. Second normal form means no column depends on only part of a composite key. Third normal form means no non-key column depends on another non-key column. In practice I normalise transactional data to 3NF and denormalise selectively for read-heavy reporting."

Follow-up questions

  • What is BCNF?
  • What are insert, update and delete anomalies?
  • When would you denormalise on purpose?

#normalization#database-design

Related questions

Practise more SQL & DBMS questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open SQL & DBMS quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.