SlideShare a Scribd company logo
FIVE NORMAL FORMS IN
RELATIONAL DATABASE THEORY
- AIME
TODAY’s CONTENT
 Why we have to learn database normalization
 Bad Relational Database Design – unnormalized
 5 Normalization Forms
 Better Relational Database Design - normailized
 Conclusion
Why normalization?
 Database Design
 Minimize Data Redundancy from UPDATE ANOMALIES
 UPDATE ANOMALIES
 Insertion anomalies
 Deletion anomalies
 Modification anomalies
Update Anomalies
Insert?
Insert? DATA
REDUNDANCY!
Delete?
Delete?
OTHER IMPORTANT
INFORMATIONS
MIGHT BE DELETED
Modify?
Modify?
MIGHT CAUSE
INCONSISTENCY
PROBLEM
BAD DATABASE DESIGN
Normalization
Unnormalization
form
1st normalization
form
2nd normalization
form
3rd normalization
form
4th normalization
form
5th normalization
form
Remove
repeating
group
Remove partial
dependencies
Remove
transitive
dependencies
Remove remaining
anomalies from
functional
dependencies
Remove multi-value
dependencies
join
dependencies
Unnormalized Form
Unnormalized Form to 1st Normalized Form
1st Normalized Form problem
 Data Redundancy
 Might cause inconsistency problem
Move to 2nd Normalized Form
Conditions
 It’s already in 1st normalized form
 All attributes have fully functional dependency with primary key, NOT partial dependency
 Get rid of Partial dependencies
Move to 2nd Normalized Form
Partial Dependency
 Non-prime field(s) depends on one primary key
 Student_ID + Course_ID Firstname, Surname, Cum.GPA, Position_ID, Position, Scholarship, Course_ID, Course, Credit, Grade, Lecturer_ID, Lecturer
 Student_ID Firstname, Surname, Cum.GPA, Position_ID, Position, Scholarship
 Course_ID  Course, Credit, Grade, Lecturer_ID, Lecturer
 Student_ID + Course_ID Grade
PK PK
PK: Primary Key
FK: Foreign Key
FK FK
2nd Normalized Form
 Separate into relation tables...
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation Table
Move to 3rd Normalized Form
Conditions
 It’s already in 2nd normalized form
 Get rid of Transitive Dependency
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation Table
Move to 3rd Normalized Form
Transitive Dependency
 Other attributes, those are not a primary key, cannot define the value of other
attributes
PK
Student Relation
Non-PK
3rd Normalized Form
 Separate into relation tables...
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK
Position Relation
3rd Normalized Form
 Separate into relation tables...
PK
Student Relation
FK FK
Student-Course Relation
FK
PK
Position Relation
PK Course Relation FK PK Lecturer Relation
Move to 4th Normalized Form
Conditions
 It’s in 3rd normalized form
 Get rid of multi-valued dependencies
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK Position Relation
FK PK Lecturer Relation
Move to 4th Normalized Form
Conditions
 It’s in 3rd normalized form
 Get rid of multi-valued dependencies
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK Position Relation
FK PK Lecturer Relation
Add Research for each lecturer
Move to 4th Normalized Form
Multi-valued Dependencies
 AB; Lecturer_IDLecturer
 AC; Lecturer_IDResearch
 But B and C is independent
A B C
PK
PK
Lecturer Relation
Lecturer-Research Relation
Final Form – 4th Normalized Form
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK Position Relation
FK PK Lecturer Relation PK Lecturer-Research Relation
5th Normalized Form
 Separate more relation and it’s able to join back without spurious tuple occurance
No spurious tuple
PK Position Relation
PK Position Relation
Supurios Tuple Example
????
Spurious tuple exist!!
PK
PK
Student Relation
Course Relation
FK FK
Student-Course Relation
FK
PK Position Relation
FK PK Lecturer Relation PK Lecturer-Research Relation
OLD
version
NEW version
Conclusion
 The purpose of normalization is to
 Reduce data redundacy
 Prevent data inconsistency
 Trade-off
 Performance
 The factors to be considered while normalization
 Single-valued vs Multivalued
 Dependencies
 Partial dependency
 Transitive dependency
 Functional dependency
 Multivalued dependency
 Key and non-Key field relationship

More Related Content

Viewers also liked

J2EE Technology Mapping-21-may-2014
J2EE Technology Mapping-21-may-2014J2EE Technology Mapping-21-may-2014
J2EE Technology Mapping-21-may-2014
Nguyen Tung
 
Data tabulation related to field force and field
Data tabulation related to field force and fieldData tabulation related to field force and field
Data tabulation related to field force and field
A.k. Azad
 
DB2 LUW - Backup and Recovery
DB2 LUW - Backup and RecoveryDB2 LUW - Backup and Recovery
DB2 LUW - Backup and Recovery
imranasayed
 
File and data base management
File and data base managementFile and data base management
File and data base management
Asad Ahmed
 
Normalization case
Normalization caseNormalization case
Normalization case
Prosanta Ghosh
 
security and privacy in dbms and in sql database
security and privacy in dbms and in sql databasesecurity and privacy in dbms and in sql database
security and privacy in dbms and in sql database
gourav kottawar
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
Prosanta Ghosh
 
Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013
Prosanta Ghosh
 
Reserch design and sample design
Reserch design and sample designReserch design and sample design
Reserch design and sample design
ICFAI Business School
 
Viewing transformation
Viewing transformationViewing transformation
Viewing transformation
Udayan Gupta
 
Batch
BatchBatch
Batch file programming
Batch file programmingBatch file programming
Batch file programming
alan moreno
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Rathan Raj
 
Dbms ii mca-ch5-ch6-relational algebra-2013
Dbms ii mca-ch5-ch6-relational algebra-2013Dbms ii mca-ch5-ch6-relational algebra-2013
Dbms ii mca-ch5-ch6-relational algebra-2013
Prosanta Ghosh
 
Two dimensional viewing
Two dimensional viewingTwo dimensional viewing
Two dimensional viewing
Mohd Arif
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Nguyen Tung
 
Ship it boise
Ship it boiseShip it boise
Ship it boise
Shaun Abram
 
FILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMSFILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMS
Abhishek Dutta
 
Tabulation
Tabulation Tabulation
Tabulation
Pranav Krishna
 

Viewers also liked (19)

J2EE Technology Mapping-21-may-2014
J2EE Technology Mapping-21-may-2014J2EE Technology Mapping-21-may-2014
J2EE Technology Mapping-21-may-2014
 
Data tabulation related to field force and field
Data tabulation related to field force and fieldData tabulation related to field force and field
Data tabulation related to field force and field
 
DB2 LUW - Backup and Recovery
DB2 LUW - Backup and RecoveryDB2 LUW - Backup and Recovery
DB2 LUW - Backup and Recovery
 
File and data base management
File and data base managementFile and data base management
File and data base management
 
Normalization case
Normalization caseNormalization case
Normalization case
 
security and privacy in dbms and in sql database
security and privacy in dbms and in sql databasesecurity and privacy in dbms and in sql database
security and privacy in dbms and in sql database
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
 
Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013
 
Reserch design and sample design
Reserch design and sample designReserch design and sample design
Reserch design and sample design
 
Viewing transformation
Viewing transformationViewing transformation
Viewing transformation
 
Batch
BatchBatch
Batch
 
Batch file programming
Batch file programmingBatch file programming
Batch file programming
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Dbms ii mca-ch5-ch6-relational algebra-2013
Dbms ii mca-ch5-ch6-relational algebra-2013Dbms ii mca-ch5-ch6-relational algebra-2013
Dbms ii mca-ch5-ch6-relational algebra-2013
 
Two dimensional viewing
Two dimensional viewingTwo dimensional viewing
Two dimensional viewing
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Ship it boise
Ship it boiseShip it boise
Ship it boise
 
FILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMSFILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMS
 
Tabulation
Tabulation Tabulation
Tabulation
 

Recently uploaded

How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 

Recently uploaded (20)

How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 

5 normal forms in relational database theory

  • 1. FIVE NORMAL FORMS IN RELATIONAL DATABASE THEORY - AIME
  • 2. TODAY’s CONTENT  Why we have to learn database normalization  Bad Relational Database Design – unnormalized  5 Normalization Forms  Better Relational Database Design - normailized  Conclusion
  • 3. Why normalization?  Database Design  Minimize Data Redundancy from UPDATE ANOMALIES  UPDATE ANOMALIES  Insertion anomalies  Deletion anomalies  Modification anomalies
  • 12. Normalization Unnormalization form 1st normalization form 2nd normalization form 3rd normalization form 4th normalization form 5th normalization form Remove repeating group Remove partial dependencies Remove transitive dependencies Remove remaining anomalies from functional dependencies Remove multi-value dependencies join dependencies
  • 14. Unnormalized Form to 1st Normalized Form
  • 15. 1st Normalized Form problem  Data Redundancy  Might cause inconsistency problem
  • 16. Move to 2nd Normalized Form Conditions  It’s already in 1st normalized form  All attributes have fully functional dependency with primary key, NOT partial dependency  Get rid of Partial dependencies
  • 17. Move to 2nd Normalized Form Partial Dependency  Non-prime field(s) depends on one primary key  Student_ID + Course_ID Firstname, Surname, Cum.GPA, Position_ID, Position, Scholarship, Course_ID, Course, Credit, Grade, Lecturer_ID, Lecturer  Student_ID Firstname, Surname, Cum.GPA, Position_ID, Position, Scholarship  Course_ID  Course, Credit, Grade, Lecturer_ID, Lecturer  Student_ID + Course_ID Grade PK PK PK: Primary Key FK: Foreign Key FK FK
  • 18. 2nd Normalized Form  Separate into relation tables... PK PK Student Relation Course Relation FK FK Student-Course Relation Table
  • 19. Move to 3rd Normalized Form Conditions  It’s already in 2nd normalized form  Get rid of Transitive Dependency PK PK Student Relation Course Relation FK FK Student-Course Relation Table
  • 20. Move to 3rd Normalized Form Transitive Dependency  Other attributes, those are not a primary key, cannot define the value of other attributes PK Student Relation Non-PK
  • 21. 3rd Normalized Form  Separate into relation tables... PK PK Student Relation Course Relation FK FK Student-Course Relation FK PK Position Relation
  • 22. 3rd Normalized Form  Separate into relation tables... PK Student Relation FK FK Student-Course Relation FK PK Position Relation PK Course Relation FK PK Lecturer Relation
  • 23. Move to 4th Normalized Form Conditions  It’s in 3rd normalized form  Get rid of multi-valued dependencies PK PK Student Relation Course Relation FK FK Student-Course Relation FK PK Position Relation FK PK Lecturer Relation
  • 24. Move to 4th Normalized Form Conditions  It’s in 3rd normalized form  Get rid of multi-valued dependencies PK PK Student Relation Course Relation FK FK Student-Course Relation FK PK Position Relation FK PK Lecturer Relation Add Research for each lecturer
  • 25. Move to 4th Normalized Form Multi-valued Dependencies  AB; Lecturer_IDLecturer  AC; Lecturer_IDResearch  But B and C is independent A B C PK PK Lecturer Relation Lecturer-Research Relation
  • 26. Final Form – 4th Normalized Form PK PK Student Relation Course Relation FK FK Student-Course Relation FK PK Position Relation FK PK Lecturer Relation PK Lecturer-Research Relation
  • 27. 5th Normalized Form  Separate more relation and it’s able to join back without spurious tuple occurance No spurious tuple PK Position Relation PK Position Relation
  • 29. PK PK Student Relation Course Relation FK FK Student-Course Relation FK PK Position Relation FK PK Lecturer Relation PK Lecturer-Research Relation OLD version NEW version
  • 30. Conclusion  The purpose of normalization is to  Reduce data redundacy  Prevent data inconsistency  Trade-off  Performance  The factors to be considered while normalization  Single-valued vs Multivalued  Dependencies  Partial dependency  Transitive dependency  Functional dependency  Multivalued dependency  Key and non-Key field relationship