Skip to content
Related Articles

Related Articles

Improve Article

Introduction of Database Normalization

  • Difficulty Level : Easy
  • Last Updated : 28 Jun, 2021

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. 

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 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

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

 

My Personal Notes arrow_drop_up
Recommended Articles
Page :