A3.2.6 Construct a database normalized to 3NF for a range of real-world scenarios.

A3.2.6 Construct a database normalized to 3NF for a range of real-world scenarios. 
• Examples may include library management, hospital management, e-commerce platforms, school management, employee management, inventory management, police crime reporting

Constructing a Database Normalized to Third Normal Form (3NF)

The Big Idea

To construct a database normalized to Third Normal Form (3NF) means to design a schema in which data is logically grouped, redundancy is eliminated, and integrity is enforced. This is done by applying normalization rules step by step—1NF, 2NF, and finally 3NF—to remove structural flaws like duplicate data, partial dependencies, and transitive dependencies.

In this article, we will:

  • Explain how to construct a 3NF database schema,
  • Walk through three real-world scenarios (library, school, and e-commerce),
  • Show how data is split across tables using primary, foreign, and composite keys,
  • Emphasize functional dependencies and the removal of anomalies.

Step-by-Step: How to Normalize a Database to 3NF

Step 1: Requirements Gathering

  • Identify entities (real-world objects like Book, Student, Order)
  • Identify attributes for each entity
  • Determine functional dependencies (which attributes depend on which keys)

Step 2: Apply First Normal Form (1NF)

  • Ensure atomicity: all attributes hold indivisible values.
  • Remove repeating groups: every field holds one value per record.

Step 3: Apply Second Normal Form (2NF)

  • Ensure the table is in 1NF.
  • Remove partial dependencies: non-key attributes must depend on the whole primary key (especially important if the key is composite).

Step 4: Apply Third Normal Form (3NF)

  • Ensure the table is in 2NF.
  • Remove transitive dependencies: non-key attributes must depend only on the primary key, not on another non-key attribute.

Scenario 1: Library Management System

Unnormalized Data:

Borrower_ID, Borrower_Name, Book_ID, Book_Title, Book_Author, Issue_Date, Return_Date

This has redundancy: multiple books per borrower and repeated book details.


3NF Design:

Borrowers

borrower_idname
1Alice Smith

Books

book_idtitleauthor
10The HobbitJ.R.R. Tolkien

Borrowings

borrowing_idborrower_idbook_idissue_datereturn_date
10011102025-05-012025-05-15

Key Notes:

  • Books.title and Books.author are functionally dependent on book_id (not duplicated).
  • Borrowings uses foreign keys to connect books and borrowers.
  • Data is fully normalized—no partial or transitive dependencies remain.

Scenario 2: School Management System

Raw Data (not normalized):

Student_ID, Student_Name, Class_ID, Class_Name, Teacher_ID, Teacher_Name

There are transitive dependencies here:

  • Teacher_Name depends on Teacher_ID
  • Class_Name depends on Class_ID

3NF Design:

Students

student_idname
S001Luke Adams

Classes

class_idclass_nameteacher_id
C01Chemistry 101T001

Teachers

teacher_idname
T001Dr. Green

Enrollments

enrollment_idstudent_idclass_id
1S001C01

Functional Dependencies:

  • class_name depends on class_id
  • teacher_idteacher_name
  • All transitive dependencies are resolved.

Scenario 3: E-Commerce Platform

Initial Table:

Order_ID, Customer_Name, Product_Name, Product_Price, Quantity, Order_Date

Here:

  • Product_Price depends on Product_Name
  • Customer_Name depends on Order_ID indirectly
  • Multiple orders → duplicated customer and product data

3NF Schema:

Customers

customer_idname
C1001Maria Lopez

Products

product_idnameprice
P101Headphones89.99

Orders

order_idcustomer_idorder_date
O5001C10012025-05-25

OrderDetails

order_idproduct_idquantity
O5001P1012

Normalization Results:

  • Customer and product info stored once
  • Price is not duplicated; tied to product_id
  • Quantity and order relations are cleanly defined via a junction table

Great observation—and a fair question.

I prioritized three scenarios—library, school, and e-commerce—to provide distinct structural examples: lending systems, class-based enrollments, and transactional commerce. Each demonstrated different kinds of entity relationships, composite keys, and normalization challenges.

But you're absolutely right: police crime reporting is one of the listed scenarios in the specification, and it's rich with real-world normalization issues, especially involving multi-valued dependencies, event logging, and role-based relationships.

Here’s a full 3NF-normalized schema for a police crime reporting system:


Scenario 4: Police Crime Reporting System

Raw (Unnormalized) Data:

Report_ID, Date, Location, Officer_Name, Officer_Badge, Suspect_Name, Suspect_ID, Crime_Type, Crime_Description, Evidence_List

Problems:

  • Officer_Name depends on Officer_Badge (transitive dependency)
  • Evidence_List is likely a repeating group (violates atomicity)
  • Suspect_Name depends on Suspect_ID
  • Reports may involve multiple suspects and multiple pieces of evidence

Normalized to 3NF

Officers

officer_idnamebadge_number
O101John HarrisB-556

Suspects

suspect_idname
S301Maria Lopez

Crimes

crime_idtypedescription
C205BurglaryForced entry through back window

Reports

report_idcrime_idofficer_idreport_datelocation
R5001C205O1012025-05-26123 Elm St.

Report_Suspects

report_idsuspect_id
R5001S301

Evidence

evidence_iddescription
E9001Broken glass fragments
E9002Footprints under window

Report_Evidence

report_idevidence_id
R5001E9001
R5001E9002

Highlights of the Design

  • No repeating groups (evidence and suspects handled with junction tables)
  • No transitive dependencies (officer name and badge handled via Officer table)
  • Each entity has a single primary key, and all foreign keys match the referenced tables
  • Report connects officer, crime, location, and timestamp (many-to-many relations handled via associative tables)

Why Normalize to 3NF?

  • Avoids duplication: product names, teacher names, and author names are stored once.
  • Prevents update anomalies: changing a book's title or product price happens in one place.
  • Ensures referential integrity: foreign keys enforce valid relationships.
  • Makes queries faster and more reliable by reducing unnecessary joins and duplicates.

Summary

To construct a 3NF database:

  • Start from real-world data
  • Identify entities and relationships
  • Normalize progressively from 1NF → 2NF → 3NF
  • Use primary keys to uniquely identify records and foreign keys to link related data
  • Eliminate partial and transitive dependencies

Real-world applications like library management, school systems, and e-commerce platforms benefit greatly from this structured, rule-based approach to schema design. A properly normalized database leads to improved consistency, scalability, and long-term maintainability.