By Kshipra Soni
Presentation
on
Normalization
Objectives
 Introduction
 Normalization Rule
 First Normal Form (1NF)
 Second Normal Form (2NF)
 Third Normal Form (3NF)
 Boyce and Codd Normal Form (BCNF)
Introduction to Normalization
 Normalization is a process of organizing the data in the
database.
 It is a systematic approach of decomposing tables to
eliminate data redundancy.
 It was developed by E. F. Codd.
 Normalization is a multi-step process that puts the data into
a tabular form by removing the duplicate data from the
relation tables.
 It is a step by step decomposition of complex records into
simple records.
 It is the technique of building database structures to store
data.
Definition Of Normalization
“Normalization is a process of designing a consistent
database by minimizing redundancy and ensuring
data integrity through decomposition which is
lossless.”
Normalization is used for mainly two purpose,
 Eliminating redundant(useless) data.
 Ensuring data dependencies make sense i.e. data is
logically stored.
Features of Normalization
 Normalization avoids the data redundancy.
 It is a formal process of developing data structures.
 It promotes the data integrity.
 It ensures data dependencies make sense that
means data is logically stored.
Types Of Normalization
Following are the types of Normalization:-
1. First Normal Form
2. Second Normal Form
3. Third Normal Form
4. BCNF (Boyce – Codd Normal Form)
5. Fourth Normal Form
6. Fifth Normal Form
1. First Normal Form (1NF)
 First Normal Form (1NF) is a simple form of
Normalization.
 In 1NF, there should not be any repeating
group of data.
 Each set of column must have a unique
value.
 It contains atomic values because the table
cannot hold multiple values.
Employee Table using 1NF
For Example:-
Ecode Employee_Name Department_Name
1 ABC Sales, Production
2 PQR Human Resource
3 XYZ Quality Assurance,
Marketing
Ecode Employee_Name Department_Name
1 ABC Sales
1 ABC Production
2 PQR Human Resource
3 XYZ Quality Assurance
3 XYZ Marketing
2. Second Normal Form (2NF)
 In 2NF, the table is required in 1NF.
 2NF dose not permit partial dependency
between a non key attribute and the key
attribute.
 The main rule of 2NF is, Non key attribute
are functionally dependant on the key
attribute or primary key.
 An attribute which is not part of candidate
key is known as non-key attribute.
Example: Employee Table Using 1NF
Candidate Key:- Order_No, Item_code
Non-Prime Attribute:- Order_date, Qty, Price/unit.
 The above table is in 1NF. Each attribute has atomic values.
However, it is not in 2NF because the non key attribute
price/unit functionally dependant on Item code which is part of
candidate key.
Order No. Item code Order date Qty Price/unit
 Also, the non key attribute order date is functionally
dependant on Order_No which is a part of candidate key.
Now, the above tables comply with the Second Normal
Form (2NF).
Order No Order date
Item code Qty Price/unit
Order No Item code
3. Third Normal Form (3NF)
 Third Normal Form (3NF) is used to minimize
the transitive redundancy.
 In 3NF, the table is required in 2NF.
 While using the 2NF table, there should not
be any transitive partial dependency.
 3NF reduces the duplication of data and also
achieves the data integrity.
•In the above <Employee> table, EId is a primary key but
City, State depends upon Zip code.
•The dependency between Zip and other fields is called
Transitive Dependency.
•Therefore we apply 3NF. So, we need to move the city and
state to the new <Employee_Table2> table, with Zip as a
Primary key.
Eid Ename DOB City State Zip
001 ABC 10/05/1990 Pune Maharashtra 411038
002 XYZ 11/05/1988 Mumbai Maharashtra 400007
Eid Ename DOB ZIP
001 ABC 10/05/1990 411038
002 XYZ 11/05/1988 400007
City State Zip
Pune Maharashtra 411038
Mumbai Maharashtra 400007
 The advantage of removing transitive
dependency is, it reduces the amount of data
dependencies and achieves the data integrity.
 In the above example, using with the 3NF, there
is no redundancy of data while inserting the
new records.
 The City, State and Zip code will be stored in
the separate table. And therefore the updation
becomes more easier because of no data
redundancy.
4. BCNF (Boyce – Code Normal Form)
 BCNF which stands for Boyce – Code Normal
From is developed by Raymond F. Boyce and
E. F. Codd in 1974.
 BCNF is a higher version of 3NF.
 It deals with the certain type of anomaly
which is not handled by 3NF.
 If an attribute of a composite key is
dependent on an attribute of the other
composite key, a normalization called BCNF.
Prof code Department Head of the
dept
Percent time
P1 Physics Ghosh 50
P1 Maths Krishnan 50
P2 Chemistry Rao 25
P2 Physics Ghosh 75
P3 Maths Krishnan 100
The given relation is in 3NF. Observe, that the name of the
department and head of the dept. are duplicated. Further, if
P2 resign, rows 3 and 4 are deleted. We loss the
information that Rao is the Head of the dept. of chemistry.
Porf code Department Percent time
P1 Physics 50
P1 Maths 50
P2 Chemistry 25
P2 Physics 75
P3 Maths 100
Department Head of the dept
Physics Ghosh
Maths Krishnan
Chemistry Rao
5. Fourth Normal Form (4NF)
 A relation is in 4NF if it is a BCNF and contains
no multivalued dependencies.
 This normal form is rarely used outside of
academic circles.
 A multivalued dependency exists when there are
at least three attributes (For say A, B and C)in a
relation and for each value of A there is a well
defined set of values of B and a well defined set
of values of C. However set of values of B is
independent of set C and vice versa.
Course Instructor Text book
Management White Drucker
Green Peters
Black
Finance Gray Jones
Chang
Course Instructor Text book
Management White Druker
Management White Peters
Management Green Druker
Management Green Peters
Management Black Druker
Management Black Peters
Finance Gray Jones
Finance Gray Chang
Course Instructor
Management White
Management Green
Management Black
Finance Gray
Course Text book
Management Druker
Management Peters
Finance Jones
Finance Chang
6. Fifth Normal Form (5NF)
 The 5NF related to join dependency, which is
the term used to indicate the property of
relation schema that can not be decomposed
losslessly into two simpler relation schemas,
but can be decomposed losslessly into three
or more simpler relation schemas.
Thank you

Presentation on Normalization.pptx

  • 1.
  • 2.
    Objectives  Introduction  NormalizationRule  First Normal Form (1NF)  Second Normal Form (2NF)  Third Normal Form (3NF)  Boyce and Codd Normal Form (BCNF)
  • 3.
    Introduction to Normalization Normalization is a process of organizing the data in the database.  It is a systematic approach of decomposing tables to eliminate data redundancy.  It was developed by E. F. Codd.  Normalization is a multi-step process that puts the data into a tabular form by removing the duplicate data from the relation tables.  It is a step by step decomposition of complex records into simple records.  It is the technique of building database structures to store data.
  • 4.
    Definition Of Normalization “Normalizationis a process of designing a consistent database by minimizing redundancy and ensuring data integrity through decomposition which is lossless.” Normalization is used for mainly two purpose,  Eliminating redundant(useless) data.  Ensuring data dependencies make sense i.e. data is logically stored.
  • 5.
    Features of Normalization Normalization avoids the data redundancy.  It is a formal process of developing data structures.  It promotes the data integrity.  It ensures data dependencies make sense that means data is logically stored.
  • 6.
    Types Of Normalization Followingare the types of Normalization:- 1. First Normal Form 2. Second Normal Form 3. Third Normal Form 4. BCNF (Boyce – Codd Normal Form) 5. Fourth Normal Form 6. Fifth Normal Form
  • 7.
    1. First NormalForm (1NF)  First Normal Form (1NF) is a simple form of Normalization.  In 1NF, there should not be any repeating group of data.  Each set of column must have a unique value.  It contains atomic values because the table cannot hold multiple values.
  • 8.
    Employee Table using1NF For Example:- Ecode Employee_Name Department_Name 1 ABC Sales, Production 2 PQR Human Resource 3 XYZ Quality Assurance, Marketing Ecode Employee_Name Department_Name 1 ABC Sales 1 ABC Production 2 PQR Human Resource 3 XYZ Quality Assurance 3 XYZ Marketing
  • 9.
    2. Second NormalForm (2NF)  In 2NF, the table is required in 1NF.  2NF dose not permit partial dependency between a non key attribute and the key attribute.  The main rule of 2NF is, Non key attribute are functionally dependant on the key attribute or primary key.  An attribute which is not part of candidate key is known as non-key attribute.
  • 10.
    Example: Employee TableUsing 1NF Candidate Key:- Order_No, Item_code Non-Prime Attribute:- Order_date, Qty, Price/unit.  The above table is in 1NF. Each attribute has atomic values. However, it is not in 2NF because the non key attribute price/unit functionally dependant on Item code which is part of candidate key. Order No. Item code Order date Qty Price/unit  Also, the non key attribute order date is functionally dependant on Order_No which is a part of candidate key.
  • 11.
    Now, the abovetables comply with the Second Normal Form (2NF). Order No Order date Item code Qty Price/unit Order No Item code
  • 12.
    3. Third NormalForm (3NF)  Third Normal Form (3NF) is used to minimize the transitive redundancy.  In 3NF, the table is required in 2NF.  While using the 2NF table, there should not be any transitive partial dependency.  3NF reduces the duplication of data and also achieves the data integrity.
  • 13.
    •In the above<Employee> table, EId is a primary key but City, State depends upon Zip code. •The dependency between Zip and other fields is called Transitive Dependency. •Therefore we apply 3NF. So, we need to move the city and state to the new <Employee_Table2> table, with Zip as a Primary key. Eid Ename DOB City State Zip 001 ABC 10/05/1990 Pune Maharashtra 411038 002 XYZ 11/05/1988 Mumbai Maharashtra 400007
  • 14.
    Eid Ename DOBZIP 001 ABC 10/05/1990 411038 002 XYZ 11/05/1988 400007 City State Zip Pune Maharashtra 411038 Mumbai Maharashtra 400007
  • 15.
     The advantageof removing transitive dependency is, it reduces the amount of data dependencies and achieves the data integrity.  In the above example, using with the 3NF, there is no redundancy of data while inserting the new records.  The City, State and Zip code will be stored in the separate table. And therefore the updation becomes more easier because of no data redundancy.
  • 16.
    4. BCNF (Boyce– Code Normal Form)  BCNF which stands for Boyce – Code Normal From is developed by Raymond F. Boyce and E. F. Codd in 1974.  BCNF is a higher version of 3NF.  It deals with the certain type of anomaly which is not handled by 3NF.  If an attribute of a composite key is dependent on an attribute of the other composite key, a normalization called BCNF.
  • 17.
    Prof code DepartmentHead of the dept Percent time P1 Physics Ghosh 50 P1 Maths Krishnan 50 P2 Chemistry Rao 25 P2 Physics Ghosh 75 P3 Maths Krishnan 100 The given relation is in 3NF. Observe, that the name of the department and head of the dept. are duplicated. Further, if P2 resign, rows 3 and 4 are deleted. We loss the information that Rao is the Head of the dept. of chemistry.
  • 18.
    Porf code DepartmentPercent time P1 Physics 50 P1 Maths 50 P2 Chemistry 25 P2 Physics 75 P3 Maths 100 Department Head of the dept Physics Ghosh Maths Krishnan Chemistry Rao
  • 19.
    5. Fourth NormalForm (4NF)  A relation is in 4NF if it is a BCNF and contains no multivalued dependencies.  This normal form is rarely used outside of academic circles.  A multivalued dependency exists when there are at least three attributes (For say A, B and C)in a relation and for each value of A there is a well defined set of values of B and a well defined set of values of C. However set of values of B is independent of set C and vice versa.
  • 20.
    Course Instructor Textbook Management White Drucker Green Peters Black Finance Gray Jones Chang Course Instructor Text book Management White Druker Management White Peters Management Green Druker Management Green Peters Management Black Druker Management Black Peters Finance Gray Jones Finance Gray Chang
  • 21.
    Course Instructor Management White ManagementGreen Management Black Finance Gray Course Text book Management Druker Management Peters Finance Jones Finance Chang
  • 22.
    6. Fifth NormalForm (5NF)  The 5NF related to join dependency, which is the term used to indicate the property of relation schema that can not be decomposed losslessly into two simpler relation schemas, but can be decomposed losslessly into three or more simpler relation schemas.
  • 23.