Database Normalization

 



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. 


  1. First Normal Form or 1NF
  2. Second Normal Form or 2NF
  3. Third Normal Form or 3rdNF
  4. Boyce and Codd Normal Form Or BCNF
  5. 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

  1. only have single(atomic) valued attributes
  2. The same domain values stored in a column 
  3. All columns in a table must be unique names
  4. sorting of data is not important. the stored data could be in any position 


Second Normal Form (2NF)

in the Second Normal Form:

  1. It must be in the First Normal form.
  2. There must not be any Partial Dependency.



Third Normal Form (3NF)


  1. Make sure data already in second normal form
  2. 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,

  1. It is in the Boyce-Codd Normal Form
  2. There will be no Multi-Valued Dependency

FAQ

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 

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 



Post a Comment

1 Comments

translate dubai said…
This comment has been removed by a blog administrator.