dev.rean.me
database

11 - Database Normalization Example (Video in Khmer)

See a simple example of database normalization and learn how related tables can reduce repeated information, with tips and a Khmer video.

2026-08-29 ยท 2 min read

Share:

Hello my friend! In this lesson, we look at another example of database normalization. We organize customer orders into related tables to reduce repeated information and make the data easier to maintain. The video is in Khmer.

Before normalization

Imagine one table stores order, customer, and product information together:

OrderIDCustomerNameProduct1Product2
101SokhaBookPen

This design has problems. Product names are stored in numbered columns, and it is difficult to add more products. Customer details may also be repeated for every order.

Organize the information into tables

First, store each product in its own row. Then keep customer, order, and product details in separate tables:

Customers(CustomerID, CustomerName)
Orders(OrderID, CustomerID, OrderDate)
Products(ProductID, ProductName)
OrderItems(OrderID, ProductID, Quantity)
  • Customers stores each customer once.
  • Orders stores each order and the customer who placed it.
  • Products stores each product once.
  • OrderItems records which products are in each order and their quantities.

In OrderItems, OrderID and ProductID refer to rows in Orders and Products. Together, they can identify a product entry in an order. A database can use a combined primary key for these columns.

This layout helps avoid repeating customer and product details in every order row. It also lets an order contain any number of products.

Watch the Video

This video shows another example of normal forms in a database.

Tips

  • Keep one value in each cell; do not make columns like Product1, Product2, and Product3.
  • Store each customer and product once, then link them with IDs.
  • Use primary keys to identify rows and foreign keys to connect tables.
  • Check that each piece of information is stored in the table it describes.
  • Test the design with orders that have different numbers of products.