Database Normalization is a technique to keep the data in an organized way with in the database. By Using Normalization, we remove data redundancy from the database.
The Database Normalization perform in multi-step, that remove duplicated data from the relevant entities.
Normalization mainly serve two main purposes,
- Eliminating redundant(repetitive and useless ) data.
- Make sure data stored in logical way and relationship of data in different entities are satisfactory
Why Normalization Require
To increase the performance of database and data operations.
The duplicate data may take more space as well and It needs to be review carefully before applying database operations like insert, update, delete by Database Admin.
Type of Normalization
Below are the type of normalization. These are five but normally three types used mostly in most cases.
- First Normal Form or 1NF
- Second Normal Form or 2NF
- Third Normal Form or 3rdNF
- Boyce and Codd Normal Form Or BCNF
- Fourth Normal Form or 4thNF
Lets understand each of them in detail
First Normal Form (1NF)
An entity to be in the First Normal Form, it should follow the following
- only have single(atomic) valued attributes
- The same domain values stored in a column
- All columns in a table must be unique names
- sorting of data is not important. the stored data could be in any position
Second Normal Form (2NF)
in the Second Normal Form:
- It must be in the First Normal form.
- There must not be any Partial Dependency.
Third Normal Form (3NF)
- Make sure data already in second normal form
- it should not have Transitive Dependency.
Boyce and Codd Normal Form (BCNF)
Boyce and Codd Normal Form is a higher version of the Third Normal form. Its only deals with certain type of anomaly that is not handled by 3rd normal form.
Fourth Normal Form (4NF)
A table is said to be in the Fourth Normal Form when,
- It is in the Boyce-Codd Normal Form
- There will be no Multi-Valued Dependency
Q1. What is database normalization
What is Normalisation in a database?
Answer
Normalization is the process of organizing data in a database. This includes creating tables and establishing relationships between those tables
Q2. what is 1NF, 2NF and 3NF
Answer
A relation is in 1NF if it contains an atomic value. 2NF. A relation will be in 2NF if it is in 1NF and all non-key attributes are fully functional dependent on the primary key. 3NF.
Q3. What are the benefits or Normalization
Answer
The data stored in more organized way and performance of database will increase.
Q4. Is database normalization always good?
Answer
No, it is not necessary that normalization always good. It's depends on application algorithms and data usage. Sometimes database de normalization requires
Q5. which normalization is best?
Answer
The best normalization technique is one that empirically works well, so try new ideas if you think they'll work well
1 Comments