Open In App
Related Articles

Introduction of Database Normalization

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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)

Problems because of data redundancy: 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. 

Functional Dependency: Functional Dependency is a constraint between two sets of attributes in relation to a database. A functional dependency is denoted by an arrow (?). If an attribute A functionally determines B, then it is written as A ? B. 

For example, employee_id ? name means employee_id functionally determines the name of the employee. As another example in a timetable database, {student_id, time} ? {lecture_room}, student ID and time determine the lecture room where the student should be. 

Advantages of Functional Dependency

  • The database’s data quality is maintained using it. 
  • It communicates the database design’s facts. 
  • It aids in precisely outlining the limitations and implications of databases. 
  • It is useful to recognize poor designs. 
  • Finding the potential keys in the relationship is the first step in the normalization procedure. Identifying potential keys and normalizing the database without functional dependencies is impossible. 



What does functionally dependent mean? 

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

Trivial Functional Dependency 

X ? Y is trivial only when Y is a subset of X. 

Examples  

ABC ? AB
ABC ? A
ABC ? ABC

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: 

Id ? Name, 
Name ? DOB

Semi Non Trivial Functional Dependencies 

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

Examples: 
 

AB ? BC, 
AD ? DC

The features of database normalization are as follows:

Elimination of Data Redundancy: One of the main features of normalization is to eliminate the data redundancy that can occur in a database. Data redundancy refers to the repetition of data in different parts of the database. Normalization helps in reducing or eliminating this redundancy, which can improve the efficiency and consistency of the database.

Ensuring Data Consistency: Normalization helps in ensuring that the data in the database is consistent and accurate. By eliminating redundancy, normalization helps in preventing inconsistencies and contradictions that can arise due to different versions of the same data.

Simplification of Data Management: Normalization simplifies the process of managing data in a database. By breaking down a complex data structure into simpler tables, normalization makes it easier to manage the data, update it, and retrieve it.

Improved Database Design: Normalization helps in improving the overall design of the database. By organizing the data in a structured and systematic way, normalization makes it easier to design and maintain the database. It also makes the database more flexible and adaptable to changing business needs.

Avoiding Update Anomalies: Normalization helps in avoiding update anomalies, which can occur when updating a single record in a table affects multiple records in other tables. Normalization ensures that each table contains only one type of data and that the relationships between the tables are clearly defined, which helps in avoiding such anomalies.

Standardization: Normalization helps in standardizing the data in the database. By organizing the data into tables and defining relationships between them, normalization helps in ensuring that the data is stored in a consistent and uniform manner.

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


Last Updated : 11 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads