SlideShare a Scribd company logo
1 of 20
Download to read offline
Normalization
Lecture 2
Assistant Lecturer Huda A. Alameen
hudaa.alameen@uokufa.edu.iq
Redundant information in tuples and update
anomalies
 Information is stored redundantly
 Storage waste.
 Causes problems with update anomalies
•Insertion anomalies
•Deletion anomalies
•Update anomalies
Two relation schemas suffering from update
anomalies
Ename Ssn Bdate Adrress Dnumber Dname Dmgr_ssn
John 111 1/1/1990 A 5 R 33333
Smith 222 2/10/1988 B 5 R 33333
Zaid 112 5/8/1990 C 7 F 3335
NOOR 321 5/8/1990 Y 8 W 21333
Ali 342 2/11/1993 E 7 F 3335
Two relation schemas suffering from
update anomalies
• Insertion anomalies occur in PROJECT-EMPLOYEE relation because we can not insert
information about any new employee unless that employee is already assigned to a project.
Any attribute of the composite key (Proj-ID,Emp-ID) can not be NULL.
• Deletion anomalies occur when we delete the last tuple of a particular employee. In
this case, we not only delete the project information that connects that employee to a
particular project but also lose other information about the department for which this
employee works.
Two relation schemas suffering from
update anomalies
• Update anomalies occur because the department for which an employee works may
appear many times in the table. It is this redundancy of information that causes the
anomaly because if an employee moves to another department, we are now faced with
two problems: we either search the entire table looking for that employee and update
his Emp-Dpt value or we miss one or more tuples of that employee and end up with an
inconsistent state.
Normalization
 Normalization:
The 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 normal form.
Functional Dependency
Example of FD constraints
Normal Forms
 First normal Form
 Second normal form
 Third normal form
 Boyce Codd Normal form
 Fourth normal form
 Fifth normal form
1NF : First Normal Form
 Disallows
-Multivalued attributes
-Composite attributes
Normalization of nested relations into
1NF
2NF : Second Normal Form
 Uses the concepts of FDs, primary key
 Definitions
Prime attribute: An attribute that is member of the primary key K
Full functional dependency: a FD Y -> Z where removal of any attribute from Y
means the FD does not hold any more
 Examples:
{SSN, PNUMBER} -> HOURS is a full FD since neither SSN -> HOURS nor PNUMBER
-> HOURS hold
{SSN, PNUMBER} -> ENAME is not a full FD (it is called a partial dependency )
since SSN -> ENAME also holds
2NF : Second Normal Form
 A relation schema R is in second normal form (2NF) if every non-
prime attribute A in R is fully functionally dependent on the primary
key
 R can be decomposed into 2NF relations via the process of 2NF
normalization
2NF : Second Normal Form
3NF : Third Normal Form
 Disallows Transitive Dependency
 Definition:
Transitive functional dependency: a FD X -> Z that can be
derived from two FDs X -> Y and Y -> Z
 Examples:
SSN -> DMGRSSN is a transitive FD
Since SSN -> DNUMBER and DNUMBER -> DMGRSSN hold
SSN -> ENAME is non-transitive
Since there is no set of attributes X where SSN -> X
and X -> ENAME
3NF : Third Normal Form

More Related Content

What's hot (9)

Database - Normalization
Database - NormalizationDatabase - Normalization
Database - Normalization
 
Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)
 
Normal forms
Normal formsNormal forms
Normal forms
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf
 
Slide4 er-stu
Slide4 er-stuSlide4 er-stu
Slide4 er-stu
 
Normalization(15.09.2010)
Normalization(15.09.2010)Normalization(15.09.2010)
Normalization(15.09.2010)
 
Computer Scinece:RDBMS :Normalisation
Computer Scinece:RDBMS :NormalisationComputer Scinece:RDBMS :Normalisation
Computer Scinece:RDBMS :Normalisation
 
Difference between annotated and labelled
Difference between annotated and labelledDifference between annotated and labelled
Difference between annotated and labelled
 

Similar to Normalization

Similar to Normalization (18)

Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
free Video lecture in India
free Video lecture in Indiafree Video lecture in India
free Video lecture in India
 
chap 10 dbms.pptx
chap 10 dbms.pptxchap 10 dbms.pptx
chap 10 dbms.pptx
 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
 
Normmmalizzarion.ppt
Normmmalizzarion.pptNormmmalizzarion.ppt
Normmmalizzarion.ppt
 
Normalization1
Normalization1Normalization1
Normalization1
 
Normalization
NormalizationNormalization
Normalization
 
week 7 normalization.pptx
week 7 normalization.pptxweek 7 normalization.pptx
week 7 normalization.pptx
 
Normalisation
NormalisationNormalisation
Normalisation
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5
 
6. normalization
6. normalization6. normalization
6. normalization
 
Normalization
NormalizationNormalization
Normalization
 
Normal forms & Normalization.pptx
Normal forms & Normalization.pptxNormal forms & Normalization.pptx
Normal forms & Normalization.pptx
 
Relational database design
Relational database designRelational database design
Relational database design
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
 
chapter_8.pptx
chapter_8.pptxchapter_8.pptx
chapter_8.pptx
 

More from Huda Alameen (20)

Architectural design
Architectural designArchitectural design
Architectural design
 
System Modeling
System ModelingSystem Modeling
System Modeling
 
Requirements Engineering
Requirements EngineeringRequirements Engineering
Requirements Engineering
 
Java Repetiotion Statements
Java Repetiotion StatementsJava Repetiotion Statements
Java Repetiotion Statements
 
Java input Scanner
Java input Scanner Java input Scanner
Java input Scanner
 
Java Print method
Java  Print methodJava  Print method
Java Print method
 
Softweare Engieering
Softweare Engieering Softweare Engieering
Softweare Engieering
 
Softweare Engieering
Softweare Engieering Softweare Engieering
Softweare Engieering
 
Structured query language(sql)
Structured query language(sql)Structured query language(sql)
Structured query language(sql)
 
Sql viwes
Sql viwesSql viwes
Sql viwes
 
Relational algebra
Relational algebraRelational algebra
Relational algebra
 
Lecture one db
Lecture one dbLecture one db
Lecture one db
 
Introduction to structured query language
Introduction to structured query languageIntroduction to structured query language
Introduction to structured query language
 
Indexing techniques
Indexing techniquesIndexing techniques
Indexing techniques
 
Agg fun
Agg funAgg fun
Agg fun
 
Se lec1 (1)
Se lec1 (1)Se lec1 (1)
Se lec1 (1)
 
Se lec6
Se lec6Se lec6
Se lec6
 
Se lec5
Se lec5Se lec5
Se lec5
 
Se lec 4
Se lec 4Se lec 4
Se lec 4
 
Se lec 3
Se lec 3Se lec 3
Se lec 3
 

Recently uploaded

Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
gindu3009
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Lokesh Kothari
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
Lokesh Kothari
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
Sérgio Sacani
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
PirithiRaju
 

Recently uploaded (20)

GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
 
GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)
 
Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 

Normalization

  • 1. Normalization Lecture 2 Assistant Lecturer Huda A. Alameen hudaa.alameen@uokufa.edu.iq
  • 2. Redundant information in tuples and update anomalies  Information is stored redundantly  Storage waste.  Causes problems with update anomalies •Insertion anomalies •Deletion anomalies •Update anomalies
  • 3. Two relation schemas suffering from update anomalies
  • 4. Ename Ssn Bdate Adrress Dnumber Dname Dmgr_ssn John 111 1/1/1990 A 5 R 33333 Smith 222 2/10/1988 B 5 R 33333 Zaid 112 5/8/1990 C 7 F 3335 NOOR 321 5/8/1990 Y 8 W 21333 Ali 342 2/11/1993 E 7 F 3335
  • 5. Two relation schemas suffering from update anomalies • Insertion anomalies occur in PROJECT-EMPLOYEE relation because we can not insert information about any new employee unless that employee is already assigned to a project. Any attribute of the composite key (Proj-ID,Emp-ID) can not be NULL. • Deletion anomalies occur when we delete the last tuple of a particular employee. In this case, we not only delete the project information that connects that employee to a particular project but also lose other information about the department for which this employee works.
  • 6. Two relation schemas suffering from update anomalies • Update anomalies occur because the department for which an employee works may appear many times in the table. It is this redundancy of information that causes the anomaly because if an employee moves to another department, we are now faced with two problems: we either search the entire table looking for that employee and update his Emp-Dpt value or we miss one or more tuples of that employee and end up with an inconsistent state.
  • 7. Normalization  Normalization: The 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 normal form.
  • 9. Example of FD constraints
  • 10. Normal Forms  First normal Form  Second normal form  Third normal form  Boyce Codd Normal form  Fourth normal form  Fifth normal form
  • 11.
  • 12. 1NF : First Normal Form  Disallows -Multivalued attributes -Composite attributes
  • 13.
  • 14.
  • 15. Normalization of nested relations into 1NF
  • 16. 2NF : Second Normal Form  Uses the concepts of FDs, primary key  Definitions Prime attribute: An attribute that is member of the primary key K Full functional dependency: a FD Y -> Z where removal of any attribute from Y means the FD does not hold any more  Examples: {SSN, PNUMBER} -> HOURS is a full FD since neither SSN -> HOURS nor PNUMBER -> HOURS hold {SSN, PNUMBER} -> ENAME is not a full FD (it is called a partial dependency ) since SSN -> ENAME also holds
  • 17. 2NF : Second Normal Form  A relation schema R is in second normal form (2NF) if every non- prime attribute A in R is fully functionally dependent on the primary key  R can be decomposed into 2NF relations via the process of 2NF normalization
  • 18. 2NF : Second Normal Form
  • 19. 3NF : Third Normal Form  Disallows Transitive Dependency  Definition: Transitive functional dependency: a FD X -> Z that can be derived from two FDs X -> Y and Y -> Z  Examples: SSN -> DMGRSSN is a transitive FD Since SSN -> DNUMBER and DNUMBER -> DMGRSSN hold SSN -> ENAME is non-transitive Since there is no set of attributes X where SSN -> X and X -> ENAME
  • 20. 3NF : Third Normal Form