Read: 14a DB Normalization - Ahmad-Sawalqeh/amman-301d1 GitHub Wiki
DB Normalization
Database normalization is a process used to organize a database into tables and columns. The idea is that a table should be about a specific topic and that and only supporting topics included.
Reasons for Database Normalization
There are three main reasons to normalize a database:
- The first is to minimize duplicate data.
- The second is to minimize or avoid data modification issues.
- The third is to simplify queries.
Definition of Database Normalization
There are three common forms of database normalization: 1st, 2nd, and 3rd normal form. They are also abbreviated as 1NF, 2NF, and 3NF respectively.
There are several additional forms, such as BCNF, but I consider those advanced, and not too necessary to learn in the beginning.
The forms are progressive, meaning that to qualify for 3rd normal form a table must first satisfy the rules for 2nd normal form, and 2nd normal form must adhere to those for 1st normal form. Before we discuss the various forms and rules in detail, let’s summarize the various forms:
- First Normal Form: The information is stored in a relational table with each column containing atomic values. There are no repeating groups of columns.
- Second Normal Form: The table is in first normal form and all the columns depend on the table’s primary key.
- Third Normal Form: The table is in second normal form and all of its columns are not transitively dependent on the primary key If the rules don’t make too much sense, don’t worry. I’ve linked to article to help you understand them.
For now it’s important to understand there are three rules for database normalization that upon each other. Some people make database normalization seem complicated.
but it doesn’t have to be, and once you understand it, it becomes intuitive.