What Is Normalization in DBMS
What Is Normalization in DBMS
What is Normalization?
Normalization is a database design technique that reduces data
redundancy and eliminates undesirable characteristics like Insertion,
Update and Deletion Anomalies. Normalization rules divides larger tables
into smaller tables and links them using relationships. The purpose of
Normalisation in SQL is to eliminate redundant (repetitive) data and ensure
data is stored logically.
The inventor of the relational model Edgar Codd proposed the theory of
normalization of data with the introduction of the First Normal Form, and he
continued to extend theory with Second and Third Normal Form. Later he
joined Raymond F. Boyce to develop the theory of Boyce-Codd Normal
Form.
Here you see Movies Rented column has multiple values. Now let’s
move into 1st Normal Forms:
1NF Example
Example of 1NF in DBMS
Before we proceed let’s understand a few things —
In our database, we have two people with the same name Robert Phil, but
they live in different places.
A foreign key can have a different name from its primary key
It ensures rows in one table have corresponding rows in another
Unlike the Primary key, they do not have to be unique. Most often
they aren’t
Foreign keys can be null even though primary keys can not
Why do you need a foreign key?
Suppose, a novice inserts a record in Table B such as
You will only be able to insert values into your foreign key that exist in the
unique key in the parent table. This helps in referential integrity.
The above problem can be overcome by declaring membership id from
Table2 as foreign key of membership id from Table1
Consider the table 1. Changing the non-key column Full Name may change
Salutation.
To move our 2NF table into 3NF, we again need to again divide our table.
3NF Example
Below is a 3NF example in SQL database:
We have again divided our tables and created a new table which stores
Salutations.