06 - Database Normalization and Normal Forms (Video in Khmer)
Learn why databases use normalization and understand 1NF, 2NF, and 3NF with a simple example, practical tips, and a video in Khmer.
2026-08-25 ยท 3 min read
Hello my friend! In this lesson, we learn about database normalization. It helps organize relational database tables and reduce repeated information. The video lesson is in Khmer.
What is database normalization?
Normalization is a way to organize data into related tables. It helps reduce duplicate data and avoid problems when we add, update, or delete information.
For example, if a student's name is copied into many course rows, changing the name can be difficult. We can store student details once in a students table and connect them to course registrations.
Common normal forms
First Normal Form (1NF)
- Put one value in each cell.
- Do not store a list of values in one column.
- Give each row a way to be identified, usually with a key.
For example, store each course registration as its own row instead of putting several course names in one cell.
Second Normal Form (2NF)
- First, the table must follow 1NF.
- If a table has a key made from multiple columns, each other column must depend on the whole key, not only part of it.
For example, in a registration table with the key (student_id, course_id), a student's name depends on student_id, not the full key. Store the name in a separate students table.
Third Normal Form (3NF)
- First, the table must follow 2NF.
- Non-key columns should describe the key, not depend on another non-key column.
Keeping student details in students, course details in courses, and registrations in enrollments can make the data easier to maintain:
students(student_id, student_name)
courses(course_id, course_name)
enrollments(student_id, course_id, grade)
Here, student_id and course_id in enrollments connect each registration to a student and a course. The pair can identify one student's registration in one course.
Watch the Video
This video introduces normal forms in a database.
Tips
- Start with the information your application needs, then decide how tables should connect.
- Use primary keys to identify rows and foreign keys to connect related tables.
- Check for repeated data and update problems when reviewing your table design.
- Normalize carefully. Some applications may use a different design for performance, but make that choice after considering data consistency.
- Test your table design with sample records before using important data.