Normalization

 

Normalization


source image: lifewire.com


Normalization is the process of reorganizing data in a database so that it meets two requirements:
  1. There is no redundancy of data, all data is stored in only one place.
  2. Data dependencies are logical, all related data items are stored together.         

There are tree main types of normalization

First normal form (1NF)

Tables in 1NF must respect the rules:
  • Each column of the table must be a single value.
  • A column should contain value of the same type.
  • Each column attribute in a table should be unique name.
  • The order in which you store data doesn't matter.

Example: 










Second normal form (2NF)

  • The table should be already be in 1NF
  • All none key attributes are dependent of every columns that compose the primary key.
Example: 




Third normal form (3NF)

  • The table should already be in 2NF
  • Table has no transitive dependecies.
Example: 




Thank you !



Previous Post Next Post