SlideShare une entreprise Scribd logo
1  sur  18
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
NORMALIZATION IN DATABASES
Nithil.pp
nithilp@gmail.com
www.facebook.com/nithilp
twitter.com/username
in.linkedin.com/in/profilena
me
9995223505
NORMALIZATION
• The process of efficiently organizing data in a
database.
• Two goals of normalization process:
 Eliminating Redundant Data
 Ensuring data dependencies
• Main objective:
 Isolate data
 Reduce the amount of database space
 Make database structure flexible
 Consistent throughout database
• Should not suffer from following anomalies.
 Update anomalies.
 Insertion anomalies.
 Deletion anomalies.
S_No S_name S_address Course_opted
1 smith calicut php
2 turner kannur java
3 clark wayanad java
4 smith calicut Android
Normalization Stages
• 1NF
• 2NF
• 3NF
• Boyce-Codd Normal Form (BCNF or 3.5NF)
First Normal Form (1NF)
• The values in each column of a table are
atomic .
• Each table has a primary key.
• There are no repeating groups.
Second Normal Form (2NF)
• Should be in 1NF.
• Remove subsets of data that apply to multiple
rows of a table and place them in separate
tables.
• Create relationships between tables.
Third Normal Form (3NF)
• should be 2NF.
• Has no transitive functional dependencies.
• Remove columns that are
not dependent upon the primary key.
• To convert 2NF to 3NF, we again divide tables.
Boyce-Codd Normal Form(BCNF)
• Should be 3NF.
• Every determinant must be a candidate key.
• All tables can have only one primary key
• Candidate Key:
 Any attribute or a set of attributes together that
has the eligibility to become a primary key.
TRANSFORMATION FROM UNF TO
HIGHER NORMAL FORMS USING AN
EXAMPLE
Dep_no Dep_
name
Stud_no Stud_
name
Stud_
dob
Stud_
age
Course_
name
Course_
fee
1 cse 101 Name 1 1990-1-01 23 java 5000
102 Name 2 1991-5-25 22 php 4000
103 Name 3 1992-3-01 21 Java,php 5000,
4000
2 ec 104 Name 4 1990-2-01 23 robotics 10000
105 Name 5 1991-3-01 22 circuits 15000
106 Name 6 1992-4-01 21 robotics 10000
Conversion to 1st Normal Form
Dep_no Dep_
name
Stud_no Stud_
name
Stud_
dob
Stud_
age
Course_
name
Course_
fee
1 cse 101 Name 1 1990-1-01 23 java 5000
1 cse 102 Name 2 1991-5-25 22 php 4000
1 cse 103 Name 3 1992-3-01 21 Java 5000
1 cse 103 Name 3 1990-2-01 21 php 4000
2 ec 104 Name 4 1991-3-01 23 robotics 10000
2 ec 105 Name 5 1992-4-01 22 circuits 15000
2 ec 106 Name 6 1990-1-01 21 robotics 10000
Conversion to 2nd Normal Form
Dep_no Dep_name
1 cse
2 ec
Fk_dept_id Fk_stud_id Course_name Course_fee
1 101 java 5000
1 102 php 4000
1 103 Java 5000
1 103 php 4000
2 104 robotics 10000
2 105 circuits 15000
2 106 robotics 10000
Stud_no Stud_name Stud_dob Stud_age
101 Name 1 1990-1-01 23
102 Name 2 1991-5-25 22
103 Name 3 1992-3-01 21
103 Name 3 1990-2-01 21
104 Name 4 1991-3-01 23
105 Name 5 1992-4-01 22
106 Name 6 1990-1-01 21
Course_
name
Course_
fee
java 5000
php 4000
robotics 10000
circuits 15000
Dep_no Dep_
name
1 Cse
2 ec
Fk_dept_no Fk_Stud_no Fk_Course_name
1 101 java
1 102 php
1 103 Java
1 103 php
2 104 robotics
2 105 circuits
2 106 robotics
Stud_no Stud_name Stud_dob
101 Name 1 1990-1-01
102 Name 2 1991-5-25
103 Name 3 1992-3-01
103 Name 3 1990-2-01
104 Name 4 1991-3-01
105 Name 5 1992-4-01
106 Name 6 1990-1-01
Conversion to 3nd Normal Form
Conversion To BCNF
Class_name Roll_no name Class_teacher
Class a 1 smith Teacher a
Class a 2 turner Teacher a
Class b 1 clark Teacher b
Class c 1 allen Teacher c
Class_name Class_teacher
Class a Teacher a
Class b Teacher b
Class c Teacher c
Class_name Roll_no name
Class a 1 smith
Class a 2 turner
Class b 1 clark
Class c 1 allen
A Case where The table is in 3NF but not in BCNF
A Case where The table is in both in 3NF and BCNF
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

Contenu connexe

Similaire à Normalization in database

Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFBiplap Bhattarai
 
normalization of database management ppt
normalization of database management pptnormalization of database management ppt
normalization of database management pptRabiaKabir
 
Sql server ___________session3-normailzation
Sql server  ___________session3-normailzationSql server  ___________session3-normailzation
Sql server ___________session3-normailzationEhtisham Ali
 
Concept Location using Information Retrieval and Relevance Feedback
Concept Location using Information Retrieval and Relevance FeedbackConcept Location using Information Retrieval and Relevance Feedback
Concept Location using Information Retrieval and Relevance FeedbackSonia Haiduc
 
Irrf Presentation
Irrf PresentationIrrf Presentation
Irrf Presentationgregoryg
 
Natural Language to SQL Query conversion using Machine Learning Techniques on...
Natural Language to SQL Query conversion using Machine Learning Techniques on...Natural Language to SQL Query conversion using Machine Learning Techniques on...
Natural Language to SQL Query conversion using Machine Learning Techniques on...HPCC Systems
 
NLP Classifier Models & Metrics
NLP Classifier Models & MetricsNLP Classifier Models & Metrics
NLP Classifier Models & MetricsSanghamitra Deb
 
Bca1020 programming in c
Bca1020  programming in cBca1020  programming in c
Bca1020 programming in csmumbahelp
 
Normalization_BCA_
Normalization_BCA_Normalization_BCA_
Normalization_BCA_Bhavini Shah
 
Lesson5Introduction2QVT.pdf
Lesson5Introduction2QVT.pdfLesson5Introduction2QVT.pdf
Lesson5Introduction2QVT.pdfcifoxo
 
EE312_ Control System Engineering_Moodle_Page
EE312_ Control System Engineering_Moodle_PageEE312_ Control System Engineering_Moodle_Page
EE312_ Control System Engineering_Moodle_PagePraneel Chand
 
Performance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresPerformance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresJitendra Singh
 
CS4443 - Modern Programming Language I
CS4443 - Modern Programming Language ICS4443 - Modern Programming Language I
CS4443 - Modern Programming Language IDilawar Khan
 
Getting Started with Test-Driven Development at Midwest PHP 2021
Getting Started with Test-Driven Development at Midwest PHP 2021Getting Started with Test-Driven Development at Midwest PHP 2021
Getting Started with Test-Driven Development at Midwest PHP 2021Scott Keck-Warren
 

Similaire à Normalization in database (20)

Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
 
Kumar lav
Kumar lavKumar lav
Kumar lav
 
normalization of database management ppt
normalization of database management pptnormalization of database management ppt
normalization of database management ppt
 
Sql server ___________session3-normailzation
Sql server  ___________session3-normailzationSql server  ___________session3-normailzation
Sql server ___________session3-normailzation
 
Concept Location using Information Retrieval and Relevance Feedback
Concept Location using Information Retrieval and Relevance FeedbackConcept Location using Information Retrieval and Relevance Feedback
Concept Location using Information Retrieval and Relevance Feedback
 
Irrf Presentation
Irrf PresentationIrrf Presentation
Irrf Presentation
 
Normalisation and anomalies
Normalisation and anomaliesNormalisation and anomalies
Normalisation and anomalies
 
Chapter5.pptx
Chapter5.pptxChapter5.pptx
Chapter5.pptx
 
Natural Language to SQL Query conversion using Machine Learning Techniques on...
Natural Language to SQL Query conversion using Machine Learning Techniques on...Natural Language to SQL Query conversion using Machine Learning Techniques on...
Natural Language to SQL Query conversion using Machine Learning Techniques on...
 
NLP Classifier Models & Metrics
NLP Classifier Models & MetricsNLP Classifier Models & Metrics
NLP Classifier Models & Metrics
 
Day 6.pptx
Day 6.pptxDay 6.pptx
Day 6.pptx
 
Bca1020 programming in c
Bca1020  programming in cBca1020  programming in c
Bca1020 programming in c
 
Normalization_BCA_
Normalization_BCA_Normalization_BCA_
Normalization_BCA_
 
Lesson5Introduction2QVT.pdf
Lesson5Introduction2QVT.pdfLesson5Introduction2QVT.pdf
Lesson5Introduction2QVT.pdf
 
EE312_ Control System Engineering_Moodle_Page
EE312_ Control System Engineering_Moodle_PageEE312_ Control System Engineering_Moodle_Page
EE312_ Control System Engineering_Moodle_Page
 
Performance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresPerformance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and Underscores
 
HW04.pdf
HW04.pdfHW04.pdf
HW04.pdf
 
Week9_Theory.pptx
Week9_Theory.pptxWeek9_Theory.pptx
Week9_Theory.pptx
 
CS4443 - Modern Programming Language I
CS4443 - Modern Programming Language ICS4443 - Modern Programming Language I
CS4443 - Modern Programming Language I
 
Getting Started with Test-Driven Development at Midwest PHP 2021
Getting Started with Test-Driven Development at Midwest PHP 2021Getting Started with Test-Driven Development at Midwest PHP 2021
Getting Started with Test-Driven Development at Midwest PHP 2021
 

Plus de baabtra.com - No. 1 supplier of quality freshers

Plus de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Dernier

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
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
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
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 

Dernier (20)

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
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
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
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 

Normalization in database

  • 1.
  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 4. NORMALIZATION • The process of efficiently organizing data in a database. • Two goals of normalization process:  Eliminating Redundant Data  Ensuring data dependencies • Main objective:  Isolate data  Reduce the amount of database space  Make database structure flexible  Consistent throughout database
  • 5. • Should not suffer from following anomalies.  Update anomalies.  Insertion anomalies.  Deletion anomalies. S_No S_name S_address Course_opted 1 smith calicut php 2 turner kannur java 3 clark wayanad java 4 smith calicut Android
  • 6. Normalization Stages • 1NF • 2NF • 3NF • Boyce-Codd Normal Form (BCNF or 3.5NF)
  • 7. First Normal Form (1NF) • The values in each column of a table are atomic . • Each table has a primary key. • There are no repeating groups.
  • 8. Second Normal Form (2NF) • Should be in 1NF. • Remove subsets of data that apply to multiple rows of a table and place them in separate tables. • Create relationships between tables.
  • 9. Third Normal Form (3NF) • should be 2NF. • Has no transitive functional dependencies. • Remove columns that are not dependent upon the primary key. • To convert 2NF to 3NF, we again divide tables.
  • 10. Boyce-Codd Normal Form(BCNF) • Should be 3NF. • Every determinant must be a candidate key. • All tables can have only one primary key • Candidate Key:  Any attribute or a set of attributes together that has the eligibility to become a primary key.
  • 11. TRANSFORMATION FROM UNF TO HIGHER NORMAL FORMS USING AN EXAMPLE Dep_no Dep_ name Stud_no Stud_ name Stud_ dob Stud_ age Course_ name Course_ fee 1 cse 101 Name 1 1990-1-01 23 java 5000 102 Name 2 1991-5-25 22 php 4000 103 Name 3 1992-3-01 21 Java,php 5000, 4000 2 ec 104 Name 4 1990-2-01 23 robotics 10000 105 Name 5 1991-3-01 22 circuits 15000 106 Name 6 1992-4-01 21 robotics 10000
  • 12. Conversion to 1st Normal Form Dep_no Dep_ name Stud_no Stud_ name Stud_ dob Stud_ age Course_ name Course_ fee 1 cse 101 Name 1 1990-1-01 23 java 5000 1 cse 102 Name 2 1991-5-25 22 php 4000 1 cse 103 Name 3 1992-3-01 21 Java 5000 1 cse 103 Name 3 1990-2-01 21 php 4000 2 ec 104 Name 4 1991-3-01 23 robotics 10000 2 ec 105 Name 5 1992-4-01 22 circuits 15000 2 ec 106 Name 6 1990-1-01 21 robotics 10000
  • 13. Conversion to 2nd Normal Form Dep_no Dep_name 1 cse 2 ec Fk_dept_id Fk_stud_id Course_name Course_fee 1 101 java 5000 1 102 php 4000 1 103 Java 5000 1 103 php 4000 2 104 robotics 10000 2 105 circuits 15000 2 106 robotics 10000 Stud_no Stud_name Stud_dob Stud_age 101 Name 1 1990-1-01 23 102 Name 2 1991-5-25 22 103 Name 3 1992-3-01 21 103 Name 3 1990-2-01 21 104 Name 4 1991-3-01 23 105 Name 5 1992-4-01 22 106 Name 6 1990-1-01 21
  • 14. Course_ name Course_ fee java 5000 php 4000 robotics 10000 circuits 15000 Dep_no Dep_ name 1 Cse 2 ec Fk_dept_no Fk_Stud_no Fk_Course_name 1 101 java 1 102 php 1 103 Java 1 103 php 2 104 robotics 2 105 circuits 2 106 robotics Stud_no Stud_name Stud_dob 101 Name 1 1990-1-01 102 Name 2 1991-5-25 103 Name 3 1992-3-01 103 Name 3 1990-2-01 104 Name 4 1991-3-01 105 Name 5 1992-4-01 106 Name 6 1990-1-01 Conversion to 3nd Normal Form
  • 16. Class_name Roll_no name Class_teacher Class a 1 smith Teacher a Class a 2 turner Teacher a Class b 1 clark Teacher b Class c 1 allen Teacher c Class_name Class_teacher Class a Teacher a Class b Teacher b Class c Teacher c Class_name Roll_no name Class a 1 smith Class a 2 turner Class b 1 clark Class c 1 allen A Case where The table is in 3NF but not in BCNF A Case where The table is in both in 3NF and BCNF
  • 17. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 18. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com