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
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:
| OrderID | CustomerName | Product1 | Product2 |
|---|---|---|---|
| 101 | Sokha | Book | Pen |
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)
Customersstores each customer once.Ordersstores each order and the customer who placed it.Productsstores each product once.OrderItemsrecords 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, andProduct3. - 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.