Normalization
Normalization
Normalization
• Normalization is the process of organizing the
data in the database.
• Normalization is used to minimize the
redundancy from a relation or set of relations.
• It is also used to eliminate the undesirable
characteristics like Insertion, Update and
Deletion Anomalies.
• Normalization divides the larger table into the
smaller table and links them using relationship.
• Normalization divides the larger table into the
smaller table and links them using
relationship.
• The normal form is used to reduce
redundancy from the database table.
• Decomposition
• Recomposition
• Loss-less join decomposiiton
• 1NF
A relation is in 1NF if it contains atomic values.
• 2NF
A relation will be in 2NF if it is in 1NF and all non-key attributes
are fully functional dependent on the primary key.
• 3NF
A relation will be in 3NF if it is in 2NF and no
transition(transitive) dependency exists.
• 4NF
A relation will be in 4NF if it is in Boyce Codd normal form and
has no multi-valued dependency.
• 5NF
A relation is in 5NF if it is in 4NF and not contains any join
dependency and joining should be lossless.
First Normal Form (1NF)
• A relation will be 1NF if it contains atomic
values
• It states that an attribute of a table cannot
hold multiple values.
• It must hold only single-valued attribute.
• First normal form disallows the multi-valued
attribute, composite attribute, and their
combinations.
Relation EMPLOYEE is not in 1NF because
of multi-valued attribute EMP_PHONE.
25 30
47 35
83 38
FACULTYID COURSETEACHING
25 Chemistry
25 Biology
47 English
83 Math
83 Computer
Third Normal Form (3NF)
• A relation will be in 3NF if it is in 2NF and not
contain any transitive partial dependency.
• 3NF is used to reduce the data duplication. It
is also used to achieve the data integrity.
• If there is no transitive dependency for non-
prime attributes, then the relation must be in
third normal form.
• A relation is in third normal form if it holds
atleast one of the following conditions for
every non-trivial function dependency X → Y.
• X is a super key.
• Y is a prime attribute, i.e., each element of Y is
part of some candidate key.
FD, TD and MVD
• Functional Dependency (FD) determines the
relation of one attribute to another attribute in a
database management system (DBMS) .
• Functional dependency helps to maintain the
quality of data in the database.
• A functional dependency is denoted by an arrow →.
• The functional dependency of X on Y is represented
by X → Y.
• Functional Dependency plays a vital role to find the
difference between good and bad database design
Employee Employee Salary City
number Name
1 Dana 50000 San
Francisco
2 Francis 38000 London
3 Andrew 25000 Tokyo
Company -> CEO(if we know the company, we know its CEO's name)
CEO -> Age If we know the CEO, we know the Age
Therefore according to the rule of rule of transitive dependency:
Company -> Age should hold, that makes sense because if we know the
company name, we can know his age.
Summary of Normalization
• Normalization is a method of organizing the data in
the database which helps you to avoid data
redundancy, insertion, update & deletion anomaly. It
is a process of analyzing the relation schemas based
on their different functional dependencies and
primary key.
• Normalization is inherent to relational database
theory. It may have the effect of duplicating the
same data within the database which may result in
the creation of additional tables.
Advantages of Functional Dependency