Database Normalization | Introduction - GeeksQuiz
Database normalization is the process of organizing the attributes of database to reduce or eliminate data redundancy (having same data but at different places) .
Problems because of data redundancy
Data redundancy unnecessarily increases size of database as same data is repeated on 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 a relation from a database. Functional dependency is denoted by arrow (→). If an attributed A functionally determines B, then it is written as A → B.
For example employee_id → name means employee_id functionally determines name of employee. As another example in a time table database, {student_id, time} → {lecture_room}, student ID and time determine the lecture room where student should be.
What does functionally dependent mean?
A function dependency A → B mean for all instances of a particular value of A, there is 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.
Trivial Functional Dependency
X –> Y is trivial only when Y is subset of X.
Examples
X –> Y is a non trivial functional dependencies when Y is not a subset of X.
X –> Y is called completely non-trivial when X intersect Y is NULL.
Examples:
Read full article from Database Normalization | Introduction - GeeksQuiz
Database normalization is the process of organizing the attributes of database to reduce or eliminate data redundancy (having same data but at different places) .
Problems because of data redundancy
Data redundancy unnecessarily increases size of database as same data is repeated on 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 a relation from a database. Functional dependency is denoted by arrow (→). If an attributed A functionally determines B, then it is written as A → B.
For example employee_id → name means employee_id functionally determines name of employee. As another example in a time table database, {student_id, time} → {lecture_room}, student ID and time determine the lecture room where student should be.
What does functionally dependent mean?
A function dependency A → B mean for all instances of a particular value of A, there is 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 --> ABCNon Trivial Functional Dependencies
X –> Y is a non trivial functional dependencies when Y is not a subset of X.
X –> Y is called completely non-trivial when X intersect Y is NULL.
Examples:
Id --> Name, Name --> DOB
Read full article from Database Normalization | Introduction - GeeksQuiz