Database Normalization
Database Normalization
NORMALIZATION
FUNCTIONAL DEPENDENCIES
What is Functional Dependency
Functional dependency in DBMS, is a relationship between attributes of a
table dependent on each other.
Terminologies:
Y is functionally dependent on X
X is called the Determinant attribute set
Y is the Dependent attribute set
FUNCTIONAL DEPENDENCIES…
For example suppose we have a Students table table
with four attributes as shown below
reg_no name dept_name dept_building
42 abc CO A4
43 pqr IT A3
44 xyz CO A4
45 xyz IT A3
46 mno EC B2
47 jkl ME B2
FUNCTIONAL DEPENDENCIES…
From the above table we can conclude some valid
functional dependencies:
reg_no → dept_name . Reg no can determine
dept_name . i.e. If you know a student’s reg no, you
can determine their dept_name but not vice versa.
In this class we will discuss the first two types. You can
read on your own on the last two.
Trivial Functional Dependency
In Trivial Functional Dependency, a dependent is
always a subset of the determinant.
i.e. If X → Y and Y is the subset of X, then it is called
trivial functional dependency
Example
43 pqr 18
44 xyz 18
Trivial Functional Dependency…
Here, {reg_no, name} → name is a trivial functional
dependency, since the dependent name is a subset of
determinant set {reg_no, name}
Similarly, reg_no → reg_no is also an example of trivial
functional dependency.
Non-trivial Functional Dependency
In Non-trivial functional dependency, the dependent
is strictly not a subset of the determinant.
i.e. If X → Y and Y is not a subset of X, then it is called
Non-trivial functional dependency.
Example
reg_no name age
42 abc 17
43 pqr 18
44 xyz 18
Non-trivial Functional Dependency…
Here, reg_no → name is a non-trivial functional
dependency, since the dependent name is not a subset
of determinant reg_no
Similarly, {reg_no, name} → age is also a non-trivial
functional dependency, since age is not a subset of
{reg_no, name}
Database Normalization
Normalization is a database design technique that
reduces data redundancy
eliminates undesirable characteristics like Insertion,
Update and Deletion Anomalies.
The most widely used are the 1NF,2NF and 3NF and that is
what we will focus on this course.
1NF (First Normal Form)
Each table cell should contain a single value.
each cell in a table must hold atomic values (Atomic
means single-valued)
For example: If we have a column name phone_number
than each row for that column must save only single
phone number.
Normalization: https://
towardsdatascience.com/softly-explained-data-normaliz
ation-data-anomalies-and-dbms-keys-f8122aefaeb3
Functional Dependency:
https://www.geeksforgeeks.org/types-of-functional-dep
endencies-in-dbms
/
Data Warehousing:
https://www.geeksforgeeks.org/data-warehousing/
-THE END-
THANK YOU