Open In App

Introduction of Database Normalization

Normalization is an important process in database design that helps improve the database’s efficiency, consistency, and accuracy. It makes it easier to manage and maintain the data and ensures that the database is adaptable to changing business needs.

What is Database Normalization?

Database normalization is the process of organizing the attributes of the database to reduce or eliminate data redundancy (having the same data but at different places). Data redundancy unnecessarily increases the size of the database as the same data is repeated in many places. Inconsistency problems also arise during insert, delete, and update operations. 



What is Functional Dependency and its Types?

Functional Dependency is a constraint between two sets of attributes about a database. A function dependency A -> B means for all instances of a particular value of A, there is the same value of B. For example in the below table, A -> B is true, but B -> A is not true as there are different values of A for B = 3. 

A   B
------
1 3
2 3
4 0
1 3
4 0

1. Trivial Functional Dependency 

X -> Y is trivial only when Y is a subset of X. 

Examples  



2. Non Trivial Functional Dependencies 

X -> Y is a non-trivial functional dependency when Y is not a subset of X. 
X -> Y is called completely non-trivial when X intersect Y is NULL. 

Example: 

3. Semi Non Trivial Functional Dependencies 

X -> Y is called semi non-trivial when X intersect Y is not NULL. 

Examples: 

Advantages of Functional Dependency

Why do we need Normalization?

The primary objective for normalizing the relations is to eliminate the below anomalies. Failure to reduce anomalies results in data redundancy, which may threaten data integrity and cause additional issues as the database increases. Normalisation consists of a set of procedures that assist you in developing an effective database structure.

Features of Database Normalization

Normals Forms in DBMS

Normal Forms

Description of Normal Forms

First Normal Form (1NF)

A relation is in first normal form if every attribute in that relation is single-valued attribute. 

Second Normal Form (2NF)

A relation that is in First Normal Form and every non-primary-key attribute is fully functionally dependent on the primary key, then the relation is in Second Normal Form (2NF).

Third Normal Form (3NF)

A relation is in the third normal form, if there is no transitive dependency for non-prime attributes as well as it is in the second normal form. A relation is in 3NF if at least one of the following conditions holds in every non-trivial function dependency X –> Y.

  • X is a super key.
  • Y is a prime attribute (each element of Y is part of some candidate key).

Boyce-Codd Normal Form (BCNF)

For BCNF the relation should satisfy the below conditions

  • The relation should be in the 3rd Normal Form.
  • X should be a superkey for every functional dependency (FD) X−>Y in a given relation. 

Fourth Normal Form (4NF)

A relation R is in 4NF if and only if the following conditions are satisfied: 

Fifth Normal Form (5NF)

 A relation R is in 5NF if and only if it satisfies the following conditions:

  • R should be already in 4NF. 
  • It cannot be further non loss decomposed (join dependency).

Different Types of Keys Used in Database

Advantages of Normalization

Disadvantages of Normalization

Frequently Asked Questions on Database Normalization – FAQs

When should I denormalize a database?

Denormalization is the process of intentionally introducing redundancy into a database for performance optimization.

How does normalization impact database performance?

Normalization improves query processing while improving data consistency and speed.

What role does database design play in normalization?

Database design involves determining the structure of the database, including tables, columns, relationships, and constraints.


Article Tags :