SlideShare a Scribd company logo
1 of 32
Department of Information Technology 1Data base Technologies (ITB4201)
Normalization: An Introduction
Dr. C.V. Suresh Babu
Professor
Department of IT
Hindustan Institute of Science & Technology
Department of Information Technology 2Data base Technologies (ITB4201)
Action Plan
• Purpose of normalization.
• Problems associated with redundant data.
• Identification of various types of update anomalies such as insertion, deletion,
and modification anomalies.
• How to recognize appropriateness or quality of the design of relations.
• How functional dependencies can be used to group attributes into relations that
are in a known normal form.
• How to undertake process of normalization.
• How to identify most commonly used normal forms, namely 1NF, 2NF, 3NF.
• Quiz
Department of Information Technology 3Data base Technologies (ITB4201)
Un normalized table
Project
Code
Project Name Project
Manager
Project
Budget
Emp.
No.
Employee
Name
Departm
ent No.
Department
Name
Hourly
Rate
PC010 Banking Mrs. Narayani 100000 101 Viji D03 Database 21.00
102 Ambika D02 Testing 16.50
103 Vicky D01 IT 22.00
PC011 ERP Mrs. Sasikala 200000 104 Shakthi D03 Database 18.50
105 Shalini D02 Testing 17.00
106 Pandari D01 IT 23.50
PC012 E-commerce Mrs. Kamala 300000 107 Vidya D03 Database 21.50
108 Fathima D02 Testing 15.50
109 Padma D01 IT 20.50
Department of Information Technology 4Data base Technologies (ITB4201)
Issues in Unnormalized table:
• It is not possible to uniquely retrieve a record for example
Employee 102.
• If you want to update Department No. D03 to D04 you have to
update all the records, otherwise it leads to Data inconsistency
• It is not possible to count the no. of records in the database
• Duplicate records such as Dept. Name, Dep. No occupy space
on the storage devices
Department of Information Technology 5Data base Technologies (ITB4201)
Advantages of Normalized forms
• Ease of use
• Flexibility
• Precision
• Security
• Reliability
• Ease of Implementation.
• Clarity
Department of Information Technology 6Data base Technologies (ITB4201)
Introduction to Normalization
• Normalization: Process of decomposing unsatisfactory "bad" relations
by breaking up their attributes into smaller relations
• Normal form: Condition using keys and FDs of a relation to certify
whether a relation schema is in a particular normal form
– 2NF, 3NF, BCNF based on keys and FDs of a relation schema
– 4NF based on keys, multi-valued dependencies
Department of Information Technology 7Data base Technologies (ITB4201)
Stages of Normalization
Department of Information Technology 8Data base Technologies (ITB4201)
Data Redundancy
• Major aim of relational database design is to group attributes into relations to minimize data
redundancy and reduce file storage space required by base relations.
• Problems associated with data redundancy are illustrated by comparing the following Staff
and Branch relations with the StaffBranch relation.
Department of Information Technology 9Data base Technologies (ITB4201)
Data Redundancy
Department of Information Technology 10Data base Technologies (ITB4201)
Data Redundancy
• StaffBranch relation has redundant data: details of a branch are repeated for every member of
staff.
• In contrast, branch information appears only once for each branch in Branch relation and only
branchNo is repeated in Staff relation, to represent where each member of staff works.
Department of Information Technology 11Data base Technologies (ITB4201)
Update Anomalies
• Relations that contain redundant information may potentially suffer from update
anomalies.
• Insertion anomaly: How to add a new major?
• Modification anomaly: What would happen if we change office of Smith in the first tuple?
• Deletion anomaly: What would happen if Scott is deleted?
SID Name Major GPA Advisor Office
2011 John CS 3.4 Smith 3345
1235 Carl CS 3.2 Smith 3345
1003 Ken Math 3.5 Johnson 1120
1034 Bill Math 2.5 Johnson 1120
2005 Mary CS 2.9 Smith 3345
2078 Frank Math 4.0 Johnson 1120
1922 Scott Chem 3.45 Ford 2525
Students
Department of Information Technology 12Data base Technologies (ITB4201)
A Better Design
• Decompose Students into two relations
Major Advisor Office
CS Smith 3345
Math Johnson 1120
Chem Ford 2525
Major_Advisor
SID Name Major GPA
2011 John CS 3.4
1235 Carl CS 3.2
1003 Ken Math 3.5
1034 Bill Math 2.5
2005 Mary CS 2.9
2078 Frank Math 4.0
1922 Scott Chem 3.45
Students
Decomposition can remove redundancy
It may also cause problems if not done carefully.
Department of Information Technology 13Data base Technologies (ITB4201)
Functional Dependency
•Main concept associated with normalization.
•Functional Dependency
• Describes relationship between attributes in a relation.
• If A and B are attributes of relation R, B is functionally dependent on A (denoted
A  B), if each value of A in R is associated with exactly one value of B in R.
Department of Information Technology 14Data base Technologies (ITB4201)
Functional Dependency
•Property of the meaning (or semantics) of
the attributes in a relation.
•Diagrammatic representation:
 Determinant of a functional dependency refers
to attribute or group of attributes on left-hand
side of the arrow.
Department of Information Technology 15Data base Technologies (ITB4201)
Example - Functional Dependency
Department of Information Technology 16Data base Technologies (ITB4201)
Functional Dependency
•Main characteristics of functional dependencies used in
normalization:
•have a 1:1 relationship between attribute(s) on left and right-hand
side of a dependency;
•hold for all time;
•are nontrivial.
Department of Information Technology 17Data base Technologies (ITB4201)
Functional Dependency
•Complete set of functional dependencies for a given relation can be very
large.
•Important to find an approach that can reduce set to a manageable size.
•Need to identify set of functional dependencies (X) for a relation that is
smaller than complete set of functional dependencies (Y) for that
relation and has property that every functional dependency in Y is
implied by functional dependencies in X.
Department of Information Technology 18Data base Technologies (ITB4201)
Functional Dependency
•Let A, B, and C be subsets of the attributes of relation R.
Armstrong’s axioms are as follows:
1. Reflexivity
If B is a subset of A, then A  B
2. Augmentation
If A  B, then A,C  B,C
3. Transitivity
If A  B and B  C, then A  C
Department of Information Technology 19Data base Technologies (ITB4201)
Relationship Between Normal Forms
Department of Information Technology 20Data base Technologies (ITB4201)
Unnormalized Form (UNF)
•A table that contains one or more repeating groups.
•To create an unnormalized table:
• transform data from information source (e.g. form) into table format with columns
and rows.
Department of Information Technology 21Data base Technologies (ITB4201)
First Normal Form (1NF)
•A relation in which intersection of each row and column
contains one and only one value.
Department of Information Technology 22Data base Technologies (ITB4201)
UNF to 1NF
•Nominate an attribute or group of attributes to act as the key for the
unnormalized table.
•Identify repeating group(s) in unnormalized table which repeats for
the key attribute(s).
Department of Information Technology 23Data base Technologies (ITB4201)
UNF to 1NF
•Remove repeating group by:
• entering appropriate data into the empty columns of rows containing repeating
data (‘flattening’ the table).
Or by
• placing repeating data along with copy of the original key attribute(s) into a
separate relation.
Department of Information Technology 24Data base Technologies (ITB4201)
Second Normal Form (2NF)
•Based on concept of full functional dependency:
• A and B are attributes of a relation,
• B is fully dependent on A if B is functionally dependent on A but not on any
proper subset of A.
•2NF - A relation that is in 1NF and every non-primary-key attribute is
fully functionally dependent on the primary key.
Department of Information Technology 25Data base Technologies (ITB4201)
1NF to 2NF
• Identify primary key for the 1NF relation.
• Identify functional dependencies in the relation.
• If partial dependencies exist on the primary key remove them by
placing them in a new relation along with copy of their determinant.
Department of Information Technology 26Data base Technologies (ITB4201)
Third Normal Form (3NF)
•Based on concept of transitive dependency:
• A, B and C are attributes of a relation such that if A  B and B  C,
• then C is transitively dependent on A through B. (Provided that A is not
functionally dependent on B or C).
•3NF - A relation that is in 1NF and 2NF and in which no non-primary-
key attribute is transitively dependent on the primary key.
Department of Information Technology 27Data base Technologies (ITB4201)
2NF to 3NF
•Identify the primary key in the 2NF relation.
•Identify functional dependencies in the relation.
•If transitive dependencies exist on the primary key remove them
by placing them in a new relation along with copy of their
determinant.
Department of Information Technology 28Data base Technologies (ITB4201)
General Definitions of 2NF and 3NF
•Second normal form (2NF)
• A relation that is in 1NF and every non-primary-key attribute is fully
functionally dependent on any candidate key.
•Third normal form (3NF)
• A relation that is in 1NF and 2NF and in which no non-primary-key attribute
is transitively dependent on any candidate key.
Department of Information Technology 29Data base Technologies (ITB4201)
Review of Normalization (UNF to BCNF)
Department of Information Technology 30Data base Technologies (ITB4201)
Example
https://beginnersbook.com/2015/05/normalization-in-dbms/
https://www.studytonight.com/dbms/database-normalization.php
Department of Information Technology 31Data base Technologies (ITB4201)
Test Yourself
1. Functional Dependencies are the types of constraints that are based on______
a) Key
b) Key revisited
c) Superset key
d) None of the mentioned
2.. Which is a bottom-up approach to database design that design by examining the relationship between attributes:
a) Functional dependency
b) Database modeling
c) Normalization
d) Decomposition
3. In the __________ normal form, a composite attribute is converted to individual attributes.
a) First
b) Second
c) Third
d) Fourth
4. A table on the many side of a one to many or many to many relationship must:
a) Be in Second Normal Form (2NF)
b) Be in Third Normal Form (3NF)
c) Have a single attribute key
d) Have a composite key
5. Tables in second normal form (2NF):
a) Eliminate all hidden dependencies
b) Eliminate the possibility of a insertion anomalies
c) Have a composite key
d) Have all non key fields depend on the whole primary key
Department of Information Technology 32Data base Technologies (ITB4201)
Answers
1. Functional Dependencies are the types of constraints that are based on______
a) Key
b) Key revisited
c) Superset key
d) None of the mentioned
2.. Which is a bottom-up approach to database design that design by examining the relationship between attributes:
a) Functional dependency
b) Database modeling
c) Normalization
d) Decomposition
3. In the __________ normal form, a composite attribute is converted to individual attributes.
a) First
b) Second
c) Third
d) Fourth
4. A table on the many side of a one to many or many to many relationship must:
a) Be in Second Normal Form (2NF)
b) Be in Third Normal Form (3NF)
c) Have a single attribute key
d) Have a composite key
5. Tables in second normal form (2NF):
a) Eliminate all hidden dependencies
b) Eliminate the possibility of a insertion anomalies
c) Have a composite key
d) Have all non key fields depend on the whole primary key

More Related Content

What's hot

Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationArun Sharma
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization emailharmeet
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Jargalsaikhan Alyeksandr
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Jotham Gadot
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management SystemHitesh Mohapatra
 
Normalization in SQL | Edureka
Normalization in SQL | EdurekaNormalization in SQL | Edureka
Normalization in SQL | EdurekaEdureka!
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
 
Advantages and disadvantages of DBMS
Advantages and disadvantages of DBMSAdvantages and disadvantages of DBMS
Advantages and disadvantages of DBMSMohit Singhal
 
Database Design
Database DesignDatabase Design
Database Designlearnt
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Oum Saokosal
 

What's hot (20)

Oltp vs olap
Oltp vs olapOltp vs olap
Oltp vs olap
 
Data Models
Data ModelsData Models
Data Models
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization
 
Normalization
NormalizationNormalization
Normalization
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management System
 
Databases
DatabasesDatabases
Databases
 
Normalization in SQL | Edureka
Normalization in SQL | EdurekaNormalization in SQL | Edureka
Normalization in SQL | Edureka
 
Object oriented dbms
Object oriented dbmsObject oriented dbms
Object oriented dbms
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Data models
Data modelsData models
Data models
 
Advantages and disadvantages of DBMS
Advantages and disadvantages of DBMSAdvantages and disadvantages of DBMS
Advantages and disadvantages of DBMS
 
Database Design
Database DesignDatabase Design
Database Design
 
Data Base Management System
Data Base Management SystemData Base Management System
Data Base Management System
 
OLAP v/s OLTP
OLAP v/s OLTPOLAP v/s OLTP
OLAP v/s OLTP
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
11 Database Concepts
11 Database Concepts11 Database Concepts
11 Database Concepts
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 

Similar to Normalization

Relational database design
Relational database designRelational database design
Relational database designSURBHI SAROHA
 
ICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxInfotech27
 
2019MS EXAM REPORT20161K_unit14_pef_20190313 (1).pdf
2019MS EXAM REPORT20161K_unit14_pef_20190313 (1).pdf2019MS EXAM REPORT20161K_unit14_pef_20190313 (1).pdf
2019MS EXAM REPORT20161K_unit14_pef_20190313 (1).pdfDorinNguema
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptxkshipra sony
 
Rdbms chapter 4
Rdbms chapter 4Rdbms chapter 4
Rdbms chapter 4Monu Kumar
 
NORMALIZATION - BIS 1204: Data and Information Management I
NORMALIZATION - BIS 1204: Data and Information Management I NORMALIZATION - BIS 1204: Data and Information Management I
NORMALIZATION - BIS 1204: Data and Information Management I Mukalele Rogers
 
DB Design.ppt
DB Design.pptDB Design.ppt
DB Design.pptJakeParas
 
chap 10 dbms.pptx
chap 10 dbms.pptxchap 10 dbms.pptx
chap 10 dbms.pptxarjun431527
 
Advanced Database Systems CS352Unit 4 Individual Project.docx
Advanced Database Systems CS352Unit 4 Individual Project.docxAdvanced Database Systems CS352Unit 4 Individual Project.docx
Advanced Database Systems CS352Unit 4 Individual Project.docxnettletondevon
 
Penormalan/Normalization
Penormalan/NormalizationPenormalan/Normalization
Penormalan/NormalizationJoan Ador
 
IT6701-Information Management Unit 1
IT6701-Information Management Unit 1IT6701-Information Management Unit 1
IT6701-Information Management Unit 1SIMONTHOMAS S
 
Normmmalizzarion.ppt
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.pptDeependra35
 

Similar to Normalization (20)

Relational database design
Relational database designRelational database design
Relational database design
 
Data models
Data modelsData models
Data models
 
Relational database design
Relational database designRelational database design
Relational database design
 
Relational algebra
Relational algebraRelational algebra
Relational algebra
 
Indexing
IndexingIndexing
Indexing
 
ICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptx
 
2019MS EXAM REPORT20161K_unit14_pef_20190313 (1).pdf
2019MS EXAM REPORT20161K_unit14_pef_20190313 (1).pdf2019MS EXAM REPORT20161K_unit14_pef_20190313 (1).pdf
2019MS EXAM REPORT20161K_unit14_pef_20190313 (1).pdf
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
 
Chapter 3 ( PART 2 ).pptx
Chapter 3 ( PART 2 ).pptxChapter 3 ( PART 2 ).pptx
Chapter 3 ( PART 2 ).pptx
 
Rdbms chapter 4
Rdbms chapter 4Rdbms chapter 4
Rdbms chapter 4
 
Data Modeling
Data ModelingData Modeling
Data Modeling
 
NORMALIZATION - BIS 1204: Data and Information Management I
NORMALIZATION - BIS 1204: Data and Information Management I NORMALIZATION - BIS 1204: Data and Information Management I
NORMALIZATION - BIS 1204: Data and Information Management I
 
Database system structure
Database system structureDatabase system structure
Database system structure
 
week3.ppt
week3.pptweek3.ppt
week3.ppt
 
DB Design.ppt
DB Design.pptDB Design.ppt
DB Design.ppt
 
chap 10 dbms.pptx
chap 10 dbms.pptxchap 10 dbms.pptx
chap 10 dbms.pptx
 
Advanced Database Systems CS352Unit 4 Individual Project.docx
Advanced Database Systems CS352Unit 4 Individual Project.docxAdvanced Database Systems CS352Unit 4 Individual Project.docx
Advanced Database Systems CS352Unit 4 Individual Project.docx
 
Penormalan/Normalization
Penormalan/NormalizationPenormalan/Normalization
Penormalan/Normalization
 
IT6701-Information Management Unit 1
IT6701-Information Management Unit 1IT6701-Information Management Unit 1
IT6701-Information Management Unit 1
 
Normmmalizzarion.ppt
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.ppt
 

More from Dr. C.V. Suresh Babu (20)

Data analytics with R
Data analytics with RData analytics with R
Data analytics with R
 
Association rules
Association rulesAssociation rules
Association rules
 
Clustering
ClusteringClustering
Clustering
 
Classification
ClassificationClassification
Classification
 
Blue property assumptions.
Blue property assumptions.Blue property assumptions.
Blue property assumptions.
 
Introduction to regression
Introduction to regressionIntroduction to regression
Introduction to regression
 
DART
DARTDART
DART
 
Mycin
MycinMycin
Mycin
 
Expert systems
Expert systemsExpert systems
Expert systems
 
Dempster shafer theory
Dempster shafer theoryDempster shafer theory
Dempster shafer theory
 
Bayes network
Bayes networkBayes network
Bayes network
 
Bayes' theorem
Bayes' theoremBayes' theorem
Bayes' theorem
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Rule based system
Rule based systemRule based system
Rule based system
 
Formal Logic in AI
Formal Logic in AIFormal Logic in AI
Formal Logic in AI
 
Production based system
Production based systemProduction based system
Production based system
 
Game playing in AI
Game playing in AIGame playing in AI
Game playing in AI
 
Diagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AIDiagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AI
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

Normalization

  • 1. Department of Information Technology 1Data base Technologies (ITB4201) Normalization: An Introduction Dr. C.V. Suresh Babu Professor Department of IT Hindustan Institute of Science & Technology
  • 2. Department of Information Technology 2Data base Technologies (ITB4201) Action Plan • Purpose of normalization. • Problems associated with redundant data. • Identification of various types of update anomalies such as insertion, deletion, and modification anomalies. • How to recognize appropriateness or quality of the design of relations. • How functional dependencies can be used to group attributes into relations that are in a known normal form. • How to undertake process of normalization. • How to identify most commonly used normal forms, namely 1NF, 2NF, 3NF. • Quiz
  • 3. Department of Information Technology 3Data base Technologies (ITB4201) Un normalized table Project Code Project Name Project Manager Project Budget Emp. No. Employee Name Departm ent No. Department Name Hourly Rate PC010 Banking Mrs. Narayani 100000 101 Viji D03 Database 21.00 102 Ambika D02 Testing 16.50 103 Vicky D01 IT 22.00 PC011 ERP Mrs. Sasikala 200000 104 Shakthi D03 Database 18.50 105 Shalini D02 Testing 17.00 106 Pandari D01 IT 23.50 PC012 E-commerce Mrs. Kamala 300000 107 Vidya D03 Database 21.50 108 Fathima D02 Testing 15.50 109 Padma D01 IT 20.50
  • 4. Department of Information Technology 4Data base Technologies (ITB4201) Issues in Unnormalized table: • It is not possible to uniquely retrieve a record for example Employee 102. • If you want to update Department No. D03 to D04 you have to update all the records, otherwise it leads to Data inconsistency • It is not possible to count the no. of records in the database • Duplicate records such as Dept. Name, Dep. No occupy space on the storage devices
  • 5. Department of Information Technology 5Data base Technologies (ITB4201) Advantages of Normalized forms • Ease of use • Flexibility • Precision • Security • Reliability • Ease of Implementation. • Clarity
  • 6. Department of Information Technology 6Data base Technologies (ITB4201) Introduction to Normalization • Normalization: Process of decomposing unsatisfactory "bad" relations by breaking up their attributes into smaller relations • Normal form: Condition using keys and FDs of a relation to certify whether a relation schema is in a particular normal form – 2NF, 3NF, BCNF based on keys and FDs of a relation schema – 4NF based on keys, multi-valued dependencies
  • 7. Department of Information Technology 7Data base Technologies (ITB4201) Stages of Normalization
  • 8. Department of Information Technology 8Data base Technologies (ITB4201) Data Redundancy • Major aim of relational database design is to group attributes into relations to minimize data redundancy and reduce file storage space required by base relations. • Problems associated with data redundancy are illustrated by comparing the following Staff and Branch relations with the StaffBranch relation.
  • 9. Department of Information Technology 9Data base Technologies (ITB4201) Data Redundancy
  • 10. Department of Information Technology 10Data base Technologies (ITB4201) Data Redundancy • StaffBranch relation has redundant data: details of a branch are repeated for every member of staff. • In contrast, branch information appears only once for each branch in Branch relation and only branchNo is repeated in Staff relation, to represent where each member of staff works.
  • 11. Department of Information Technology 11Data base Technologies (ITB4201) Update Anomalies • Relations that contain redundant information may potentially suffer from update anomalies. • Insertion anomaly: How to add a new major? • Modification anomaly: What would happen if we change office of Smith in the first tuple? • Deletion anomaly: What would happen if Scott is deleted? SID Name Major GPA Advisor Office 2011 John CS 3.4 Smith 3345 1235 Carl CS 3.2 Smith 3345 1003 Ken Math 3.5 Johnson 1120 1034 Bill Math 2.5 Johnson 1120 2005 Mary CS 2.9 Smith 3345 2078 Frank Math 4.0 Johnson 1120 1922 Scott Chem 3.45 Ford 2525 Students
  • 12. Department of Information Technology 12Data base Technologies (ITB4201) A Better Design • Decompose Students into two relations Major Advisor Office CS Smith 3345 Math Johnson 1120 Chem Ford 2525 Major_Advisor SID Name Major GPA 2011 John CS 3.4 1235 Carl CS 3.2 1003 Ken Math 3.5 1034 Bill Math 2.5 2005 Mary CS 2.9 2078 Frank Math 4.0 1922 Scott Chem 3.45 Students Decomposition can remove redundancy It may also cause problems if not done carefully.
  • 13. Department of Information Technology 13Data base Technologies (ITB4201) Functional Dependency •Main concept associated with normalization. •Functional Dependency • Describes relationship between attributes in a relation. • If A and B are attributes of relation R, B is functionally dependent on A (denoted A  B), if each value of A in R is associated with exactly one value of B in R.
  • 14. Department of Information Technology 14Data base Technologies (ITB4201) Functional Dependency •Property of the meaning (or semantics) of the attributes in a relation. •Diagrammatic representation:  Determinant of a functional dependency refers to attribute or group of attributes on left-hand side of the arrow.
  • 15. Department of Information Technology 15Data base Technologies (ITB4201) Example - Functional Dependency
  • 16. Department of Information Technology 16Data base Technologies (ITB4201) Functional Dependency •Main characteristics of functional dependencies used in normalization: •have a 1:1 relationship between attribute(s) on left and right-hand side of a dependency; •hold for all time; •are nontrivial.
  • 17. Department of Information Technology 17Data base Technologies (ITB4201) Functional Dependency •Complete set of functional dependencies for a given relation can be very large. •Important to find an approach that can reduce set to a manageable size. •Need to identify set of functional dependencies (X) for a relation that is smaller than complete set of functional dependencies (Y) for that relation and has property that every functional dependency in Y is implied by functional dependencies in X.
  • 18. Department of Information Technology 18Data base Technologies (ITB4201) Functional Dependency •Let A, B, and C be subsets of the attributes of relation R. Armstrong’s axioms are as follows: 1. Reflexivity If B is a subset of A, then A  B 2. Augmentation If A  B, then A,C  B,C 3. Transitivity If A  B and B  C, then A  C
  • 19. Department of Information Technology 19Data base Technologies (ITB4201) Relationship Between Normal Forms
  • 20. Department of Information Technology 20Data base Technologies (ITB4201) Unnormalized Form (UNF) •A table that contains one or more repeating groups. •To create an unnormalized table: • transform data from information source (e.g. form) into table format with columns and rows.
  • 21. Department of Information Technology 21Data base Technologies (ITB4201) First Normal Form (1NF) •A relation in which intersection of each row and column contains one and only one value.
  • 22. Department of Information Technology 22Data base Technologies (ITB4201) UNF to 1NF •Nominate an attribute or group of attributes to act as the key for the unnormalized table. •Identify repeating group(s) in unnormalized table which repeats for the key attribute(s).
  • 23. Department of Information Technology 23Data base Technologies (ITB4201) UNF to 1NF •Remove repeating group by: • entering appropriate data into the empty columns of rows containing repeating data (‘flattening’ the table). Or by • placing repeating data along with copy of the original key attribute(s) into a separate relation.
  • 24. Department of Information Technology 24Data base Technologies (ITB4201) Second Normal Form (2NF) •Based on concept of full functional dependency: • A and B are attributes of a relation, • B is fully dependent on A if B is functionally dependent on A but not on any proper subset of A. •2NF - A relation that is in 1NF and every non-primary-key attribute is fully functionally dependent on the primary key.
  • 25. Department of Information Technology 25Data base Technologies (ITB4201) 1NF to 2NF • Identify primary key for the 1NF relation. • Identify functional dependencies in the relation. • If partial dependencies exist on the primary key remove them by placing them in a new relation along with copy of their determinant.
  • 26. Department of Information Technology 26Data base Technologies (ITB4201) Third Normal Form (3NF) •Based on concept of transitive dependency: • A, B and C are attributes of a relation such that if A  B and B  C, • then C is transitively dependent on A through B. (Provided that A is not functionally dependent on B or C). •3NF - A relation that is in 1NF and 2NF and in which no non-primary- key attribute is transitively dependent on the primary key.
  • 27. Department of Information Technology 27Data base Technologies (ITB4201) 2NF to 3NF •Identify the primary key in the 2NF relation. •Identify functional dependencies in the relation. •If transitive dependencies exist on the primary key remove them by placing them in a new relation along with copy of their determinant.
  • 28. Department of Information Technology 28Data base Technologies (ITB4201) General Definitions of 2NF and 3NF •Second normal form (2NF) • A relation that is in 1NF and every non-primary-key attribute is fully functionally dependent on any candidate key. •Third normal form (3NF) • A relation that is in 1NF and 2NF and in which no non-primary-key attribute is transitively dependent on any candidate key.
  • 29. Department of Information Technology 29Data base Technologies (ITB4201) Review of Normalization (UNF to BCNF)
  • 30. Department of Information Technology 30Data base Technologies (ITB4201) Example https://beginnersbook.com/2015/05/normalization-in-dbms/ https://www.studytonight.com/dbms/database-normalization.php
  • 31. Department of Information Technology 31Data base Technologies (ITB4201) Test Yourself 1. Functional Dependencies are the types of constraints that are based on______ a) Key b) Key revisited c) Superset key d) None of the mentioned 2.. Which is a bottom-up approach to database design that design by examining the relationship between attributes: a) Functional dependency b) Database modeling c) Normalization d) Decomposition 3. In the __________ normal form, a composite attribute is converted to individual attributes. a) First b) Second c) Third d) Fourth 4. A table on the many side of a one to many or many to many relationship must: a) Be in Second Normal Form (2NF) b) Be in Third Normal Form (3NF) c) Have a single attribute key d) Have a composite key 5. Tables in second normal form (2NF): a) Eliminate all hidden dependencies b) Eliminate the possibility of a insertion anomalies c) Have a composite key d) Have all non key fields depend on the whole primary key
  • 32. Department of Information Technology 32Data base Technologies (ITB4201) Answers 1. Functional Dependencies are the types of constraints that are based on______ a) Key b) Key revisited c) Superset key d) None of the mentioned 2.. Which is a bottom-up approach to database design that design by examining the relationship between attributes: a) Functional dependency b) Database modeling c) Normalization d) Decomposition 3. In the __________ normal form, a composite attribute is converted to individual attributes. a) First b) Second c) Third d) Fourth 4. A table on the many side of a one to many or many to many relationship must: a) Be in Second Normal Form (2NF) b) Be in Third Normal Form (3NF) c) Have a single attribute key d) Have a composite key 5. Tables in second normal form (2NF): a) Eliminate all hidden dependencies b) Eliminate the possibility of a insertion anomalies c) Have a composite key d) Have all non key fields depend on the whole primary key