SlideShare une entreprise Scribd logo
1  sur  27
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
Subhin P.V
111subru@gmail.com
www.facebook.com/111subru
twitter.com/111subru
in.linkedin.com/in/Subhin P.V
8129076036
MAIN POINTS DISCUSSED
• What normalization is and what role it plays in the
database design process
• About the normal forms 1NF, 2NF, 3NF and BCNF
• How normal forms can be transformed from lower
normal forms to higher normal forms
ABOUT NORMALIZATION
• Normalization is the process of efficiently
organizing data in a database.
• Two goals of normalization process:
 Eliminating Redundant Data
 Ensuring data dependencies
• The objective is to isolate data so that changes
of a field can be made in just one table and
then propagated through the rest of the
database using the defined relationships.
Normalization Stages
• 1NF
• 2NF
• 3NF
• Boyce-Codd Normal Form (BCNF or 3.5NF)
Normalization Stages
First Normal Form (1NF)
• The values in each column of a table are
atomic (No multi-value attributes allowed).
• Each table has a primary key: minimal set of
attributes which can uniquely identify a record
• There are no repeating groups: two columns
do not store similar information in the same
table.
Second Normal Form (2NF)
• Meet all the requirements of the first normal
form.
• Remove subsets of data that apply to multiple
rows of a table and place them in separate
tables.
• Create relationships between these new
tables and their predecessors through the use
of foreign keys.
Third Normal Form (3NF)
• Meet all the requirements of the second
normal form.
• Every non-prime attribute of R is non-
transitively dependent (i.e. directly
dependent) on every superkey of R.
• Remove columns that are
not dependent upon the primary key.
Boyce-Codd Normal Form
• Meet all the requirements of the third normal
form.
• Every determinant must be a candidate 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
• Example: Institution Having Two departments
– Each Department Has 6 Different Students And Some
Courses
– Each Student in a department can study more than
one Course
– Each course has its course fee.
– Periodically, report is generated that contains
information displayed which can be represented in a
table as shown in next slide.
Un-normalized Form Example
Problems With The Table
– The table displays data redundancies.
– The table has Multivalued Attributes
– The table entries invite data inconsistencies.
– The data redundancies yield the following anomalies:
• Update anomalies.
• Addition anomalies.
• Deletion anomalies.
Conversion to 1st Normal Form
Conversion To 1st Normal Form
– ADVANTAGES
• Each table has at least one minimal set of attributes
which can uniquely identify a record
• The values in each column have Single Value
– DISADVANTAGES
• Redundant data across multiple rows of the table is still
there
• Existence of partial and transitive dependencies
The Dependency diagram
– Depicts all dependencies found within given table
structure
– Helpful in getting bird’s-eye view of all
relationships among table’s attributes
– Makes it less likely that will overlook an important
dependency
Conversion to 2nd Normal Form
{Dep No, Dep_name}
{Stud no, Stud_name, Stud_DOB, Stud_age}
{Dep No, Stud No , Course_name, Course_fee}
Department Details:
Course Details: Student Details:
Conversion to 2nd Normal Form
• Advantages
– eliminates redundant data in the table
– It includes no partial dependencies:
– Create separate tables for sets of values that apply
to multiple records
• Disadvantages
– The table contains Transitive Dependencies.
– Some records depend on attributes other than
the table's primary key
Conversion to 3rd Normal Form
Student Details:
Department Details:
Course Details:
Student course:
{Dep No, Dep_name} , {Stud no, Stud_name,Stud_DOB} , {Dep No, Stud No ,
Course name} , {Course_name, Course_fee}
Conversion to 3rd Normal Form
• Advantages:
– No non-key attribute depends transitively on a
candidate key
– All The attributes in a table Depend on a single
primary key
Conversion To BCNF
• A Case where The table is in 3NF but not in
BCNF
Example of BCNF
fd1 clientNo, interviewDate  interviewTime, staffNo, roomNo (Primary Key)
fd2 staffNo, interviewDate, interviewTime clientNo (Candidate key)
fd3 roomNo, interviewDate, interviewTime  clientNo, staffNo (Candidate key)
fd4 staffNo, interviewDate  roomNo (not a candidate key)
As a consequece the ClientInterview relation may suffer from update anomalies.
For example, two tuples have to be updated if the roomNo need be changed for staffNo
SG5 on the 13-May-02.
ClientNo interviewDate interviewTime staffNo roomNo
CR76 13-May-02 10.30 SG5 G101
CR76 13-May-02 12.00 SG5 G101
CR74 13-May-02 12.00 SG37 G102
CR56 1-Jul-02 10.30 SG5 G102
ClientInterview
Example of BCNF(2)
To transform the ClientInterview relation to BCNF, we must remove the violating
functional dependency by creating two new relations called Interview and SatffRoom as
shown below,
Interview (clientNo, interviewDate, interviewTime, staffNo)
StaffRoom(staffNo, interviewDate, roomNo)
ClientNo interviewDate interviewTime staffNo
CR76 13-May-02 10.30 SG5
CR76 13-May-02 12.00 SG5
CR74 13-May-02 12.00 SG37
CR56 1-Jul-02 10.30 SG5
staffNo interviewDate roomNo
SG5 13-May-02 G101
SG37 13-May-02 G102
SG5 1-Jul-02 G102
Interview
StaffRoom
THANKS
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

Contenu connexe

Tendances

Tendances (20)

Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
1.4 data independence
1.4 data independence1.4 data independence
1.4 data independence
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Normalization case
Normalization caseNormalization case
Normalization case
 
Database language
Database languageDatabase language
Database language
 
Relational model
Relational modelRelational model
Relational model
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
 
Intro to trigger and constraint
Intro to trigger and constraintIntro to trigger and constraint
Intro to trigger and constraint
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Fundamentals of Database system
Fundamentals of Database systemFundamentals of Database system
Fundamentals of Database system
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization
 
Database anomalies
Database anomaliesDatabase anomalies
Database anomalies
 
Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf
 
Normal forms
Normal formsNormal forms
Normal forms
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
 
Joins in SQL
Joins in SQLJoins in SQL
Joins in SQL
 

En vedette

En vedette (20)

DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
functional dependencies with example
functional dependencies with examplefunctional dependencies with example
functional dependencies with example
 
Normalization
NormalizationNormalization
Normalization
 
Database management system
Database management systemDatabase management system
Database management system
 
Normalisation lesson plan
Normalisation   lesson planNormalisation   lesson plan
Normalisation lesson plan
 
TIMEN: An Open Temporal Expression Normalisation Resource
TIMEN: An Open Temporal Expression Normalisation ResourceTIMEN: An Open Temporal Expression Normalisation Resource
TIMEN: An Open Temporal Expression Normalisation Resource
 
Normalisation
NormalisationNormalisation
Normalisation
 
Database Normalisation
Database NormalisationDatabase Normalisation
Database Normalisation
 
Normalisation student summary
Normalisation student summaryNormalisation student summary
Normalisation student summary
 
Bcnf
BcnfBcnf
Bcnf
 
Normalisation and anomalies
Normalisation and anomaliesNormalisation and anomalies
Normalisation and anomalies
 
Normalisation
NormalisationNormalisation
Normalisation
 
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 Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Dbms and sqlpptx
Dbms and sqlpptxDbms and sqlpptx
Dbms and sqlpptx
 
Decision tree
Decision treeDecision tree
Decision tree
 
Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal form
 

Similaire à Normalization in databases

Database normalisation by D.Lukachuk
Database normalisation by D.LukachukDatabase normalisation by D.Lukachuk
Database normalisation by D.LukachukDmytro Lukachuk
 
data Normalization.pdf
data Normalization.pdfdata Normalization.pdf
data Normalization.pdfBijayNag1
 
normalization of database management ppt
normalization of database management pptnormalization of database management ppt
normalization of database management pptRabiaKabir
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - NormalizationMudasir Qazi
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design Jayant Dalvi
 
Normalization and three normal forms.pptx
Normalization and three normal forms.pptxNormalization and three normal forms.pptx
Normalization and three normal forms.pptxZoha681526
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesnsrChowdary1
 
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptxNormalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptxSIR RIP .NET
 
Normalization in relational database management systems
Normalization in relational database management systemsNormalization in relational database management systems
Normalization in relational database management systemsPreethi T G
 
Meet 6_sssssssssssssssssssssssssssssssssssss.pdf
Meet 6_sssssssssssssssssssssssssssssssssssss.pdfMeet 6_sssssssssssssssssssssssssssssssssssss.pdf
Meet 6_sssssssssssssssssssssssssssssssssssss.pdfSarahHarahap4
 
Database Normalization - First, second and Third Normal Forms with an example
Database Normalization - First, second and Third Normal Forms with an exampleDatabase Normalization - First, second and Third Normal Forms with an example
Database Normalization - First, second and Third Normal Forms with an exampleSABITHARASSISTANTPRO
 
Relational database design
Relational database designRelational database design
Relational database designSURBHI SAROHA
 

Similaire à Normalization in databases (20)

Database normalisation by D.Lukachuk
Database normalisation by D.LukachukDatabase normalisation by D.Lukachuk
Database normalisation by D.Lukachuk
 
data Normalization.pdf
data Normalization.pdfdata Normalization.pdf
data Normalization.pdf
 
normalization of database management ppt
normalization of database management pptnormalization of database management ppt
normalization of database management ppt
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - Normalization
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
 
Data Modeling
Data ModelingData Modeling
Data Modeling
 
Normalization and three normal forms.pptx
Normalization and three normal forms.pptxNormalization and three normal forms.pptx
Normalization and three normal forms.pptx
 
Normalization,ddl,dml,dcl
Normalization,ddl,dml,dclNormalization,ddl,dml,dcl
Normalization,ddl,dml,dcl
 
Exception & Database
Exception & DatabaseException & Database
Exception & Database
 
Normalization,ddl,dml,dcl
Normalization,ddl,dml,dclNormalization,ddl,dml,dcl
Normalization,ddl,dml,dcl
 
Normalization
NormalizationNormalization
Normalization
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its types
 
Normalization
NormalizationNormalization
Normalization
 
Database Normalization.docx
Database Normalization.docxDatabase Normalization.docx
Database Normalization.docx
 
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptxNormalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
Normalization ppt for RDBMS PPT FOR BCA and for computer science student..pptx
 
Normalization in relational database management systems
Normalization in relational database management systemsNormalization in relational database management systems
Normalization in relational database management systems
 
Meet 6_sssssssssssssssssssssssssssssssssssss.pdf
Meet 6_sssssssssssssssssssssssssssssssssssss.pdfMeet 6_sssssssssssssssssssssssssssssssssssss.pdf
Meet 6_sssssssssssssssssssssssssssssssssssss.pdf
 
Database Normalization - First, second and Third Normal Forms with an example
Database Normalization - First, second and Third Normal Forms with an exampleDatabase Normalization - First, second and Third Normal Forms with an example
Database Normalization - First, second and Third Normal Forms with an example
 
Relational database design
Relational database designRelational database design
Relational database design
 
Research gadot
Research gadotResearch gadot
Research gadot
 

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

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 

Dernier (20)

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
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 ...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 

Normalization in databases

  • 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
  • 3. NORMALIZATION IN DATABASES Subhin P.V 111subru@gmail.com www.facebook.com/111subru twitter.com/111subru in.linkedin.com/in/Subhin P.V 8129076036
  • 4. MAIN POINTS DISCUSSED • What normalization is and what role it plays in the database design process • About the normal forms 1NF, 2NF, 3NF and BCNF • How normal forms can be transformed from lower normal forms to higher normal forms
  • 5. ABOUT NORMALIZATION • Normalization is the process of efficiently organizing data in a database. • Two goals of normalization process:  Eliminating Redundant Data  Ensuring data dependencies • The objective is to isolate data so that changes of a field can be made in just one table and then propagated through the rest of the database using the defined relationships.
  • 6. Normalization Stages • 1NF • 2NF • 3NF • Boyce-Codd Normal Form (BCNF or 3.5NF)
  • 8. First Normal Form (1NF) • The values in each column of a table are atomic (No multi-value attributes allowed). • Each table has a primary key: minimal set of attributes which can uniquely identify a record • There are no repeating groups: two columns do not store similar information in the same table.
  • 9. Second Normal Form (2NF) • Meet all the requirements of the first normal form. • Remove subsets of data that apply to multiple rows of a table and place them in separate tables. • Create relationships between these new tables and their predecessors through the use of foreign keys.
  • 10. Third Normal Form (3NF) • Meet all the requirements of the second normal form. • Every non-prime attribute of R is non- transitively dependent (i.e. directly dependent) on every superkey of R. • Remove columns that are not dependent upon the primary key.
  • 11. Boyce-Codd Normal Form • Meet all the requirements of the third normal form. • Every determinant must be a candidate key. • Candidate Key:  Any attribute or a set of attributes together that has the eligibility to become a primary key.
  • 12. TRANSFORMATION FROM UNF TO HIGHER NORMAL FORMS USING AN EXAMPLE • Example: Institution Having Two departments – Each Department Has 6 Different Students And Some Courses – Each Student in a department can study more than one Course – Each course has its course fee. – Periodically, report is generated that contains information displayed which can be represented in a table as shown in next slide.
  • 14. Problems With The Table – The table displays data redundancies. – The table has Multivalued Attributes – The table entries invite data inconsistencies. – The data redundancies yield the following anomalies: • Update anomalies. • Addition anomalies. • Deletion anomalies.
  • 15. Conversion to 1st Normal Form
  • 16. Conversion To 1st Normal Form – ADVANTAGES • Each table has at least one minimal set of attributes which can uniquely identify a record • The values in each column have Single Value – DISADVANTAGES • Redundant data across multiple rows of the table is still there • Existence of partial and transitive dependencies
  • 17. The Dependency diagram – Depicts all dependencies found within given table structure – Helpful in getting bird’s-eye view of all relationships among table’s attributes – Makes it less likely that will overlook an important dependency
  • 18. Conversion to 2nd Normal Form {Dep No, Dep_name} {Stud no, Stud_name, Stud_DOB, Stud_age} {Dep No, Stud No , Course_name, Course_fee} Department Details: Course Details: Student Details:
  • 19. Conversion to 2nd Normal Form • Advantages – eliminates redundant data in the table – It includes no partial dependencies: – Create separate tables for sets of values that apply to multiple records • Disadvantages – The table contains Transitive Dependencies. – Some records depend on attributes other than the table's primary key
  • 20. Conversion to 3rd Normal Form Student Details: Department Details: Course Details: Student course: {Dep No, Dep_name} , {Stud no, Stud_name,Stud_DOB} , {Dep No, Stud No , Course name} , {Course_name, Course_fee}
  • 21. Conversion to 3rd Normal Form • Advantages: – No non-key attribute depends transitively on a candidate key – All The attributes in a table Depend on a single primary key
  • 22. Conversion To BCNF • A Case where The table is in 3NF but not in BCNF
  • 23. Example of BCNF fd1 clientNo, interviewDate  interviewTime, staffNo, roomNo (Primary Key) fd2 staffNo, interviewDate, interviewTime clientNo (Candidate key) fd3 roomNo, interviewDate, interviewTime  clientNo, staffNo (Candidate key) fd4 staffNo, interviewDate  roomNo (not a candidate key) As a consequece the ClientInterview relation may suffer from update anomalies. For example, two tuples have to be updated if the roomNo need be changed for staffNo SG5 on the 13-May-02. ClientNo interviewDate interviewTime staffNo roomNo CR76 13-May-02 10.30 SG5 G101 CR76 13-May-02 12.00 SG5 G101 CR74 13-May-02 12.00 SG37 G102 CR56 1-Jul-02 10.30 SG5 G102 ClientInterview
  • 24. Example of BCNF(2) To transform the ClientInterview relation to BCNF, we must remove the violating functional dependency by creating two new relations called Interview and SatffRoom as shown below, Interview (clientNo, interviewDate, interviewTime, staffNo) StaffRoom(staffNo, interviewDate, roomNo) ClientNo interviewDate interviewTime staffNo CR76 13-May-02 10.30 SG5 CR76 13-May-02 12.00 SG5 CR74 13-May-02 12.00 SG37 CR56 1-Jul-02 10.30 SG5 staffNo interviewDate roomNo SG5 13-May-02 G101 SG37 13-May-02 G102 SG5 1-Jul-02 G102 Interview StaffRoom
  • 26. 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