MySQL + SQL · Lesson 27

1NF, 2NF and 3NF with Examples

First Normal Form (1NF)

A table is in 1NF if every cell holds a single (atomic) value and there are no repeating groups.

Bad: a "subjects" column holding "Math, Science". Fix: one row per subject.

Second Normal Form (2NF)

2NF = 1NF + no partial dependency (a non-key column must depend on the whole composite key, not part).

In marks(roll, subject, student_name): student_name depends only on roll (part of key) → move it out.

Third Normal Form (3NF)

3NF = 2NF + no transitive dependency (non-key column must not depend on another non-key column).

In student(roll, city, pincode): pincode depends on city → separate city/pincode.

Summary

  • 1NF: atomic values.
  • 2NF: no partial dependency.
  • 3NF: no transitive dependency.
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

WhatsApp