Postgraduate tutorial

Database Normalization: 1NF, 2NF and 3NF

Remove redundancy from relational tables with the first three normal forms, using one example taken step by step.

  • Postgraduate
  • 2 min read
  • Free

Normalization organizes tables to reduce duplicated data and prevent update anomalies, where changing one fact means editing many rows.

Starting table

Enrollments(StudentID, StudentName, Courses, InstructorName, InstructorPhone), where Courses holds a comma-separated list like “DB101, OS201”.

First normal form (1NF)

Every column holds one atomic value and there are no repeating groups. Split the course list so each row holds one course: Enrollments(StudentID, CourseID, StudentName, CourseName, InstructorName, InstructorPhone), with the key (StudentID, CourseID).

Second normal form (2NF)

1NF, plus no column depends on only part of a composite key. StudentName depends only on StudentID, and the course details depend only on CourseID. Split them out:

  • Students(StudentID, StudentName)
  • Courses(CourseID, CourseName, InstructorName, InstructorPhone)
  • Enrollments(StudentID, CourseID)

Third normal form (3NF)

2NF, plus no column depends on another non-key column. InstructorPhone depends on the instructor, not the course. Move it:

  • Instructors(InstructorID, InstructorName, InstructorPhone)
  • Courses(CourseID, CourseName, InstructorID)
Memory aid: in 3NF, every non-key column depends on “the key, the whole key, and nothing but the key”.

Practice

Orders(OrderID, CustomerID, CustomerCity, OrderDate) breaks which normal form?

3NF: CustomerCity depends on CustomerID, a non-key column. Move it to a Customers table.

Want a live class on this?

An advisor will call you within one business day to recommend a course and a batch that fits your schedule.

  1. An advisor calls you within one business day.
  2. You talk through your background and goals for about 20 minutes.
  3. You get a recommended program and batch, with no obligation to enroll.
info@stratedgeitconsulting.com +1 (302) 434-8889 ext. 101 Monday to Saturday, 9 AM to 7 PM ET

Tell us about you

Takes about a minute. Fields marked optional can be skipped.

Enter your full name.
Enter an email address like name@example.com.
Enter a phone number so an advisor can call you.
Choose what you’re interested in.
Preferred batch
Tick the box so an advisor can contact you.

We use these details as described in our Privacy Policy. By submitting, you agree to our Terms and Conditions.