SlideShare a Scribd company logo
Normalization of Database
Database Normalisation is a technique oforganizing the data in the database.Normalization is a systematic
approach of decomposing tables to eliminate data redundancyand undesirable characteristics like Insertion,Update
and Deletion Anamolies.Itis a multi-step process that puts data into tabular form by removing duplicated data from
the relation tables.
Normalization is used for mainlytwo purpose,
 Eliminating reduntant(useless) data.
 Ensuring data dependencies make sense i.e data is logicallystored.
Problem Without Normalization
Without Normalization,itbecomes difficultto handle and update the database,withoutfacing data loss.Insertion,
Updation and Deletion Anamolies are very frequent if Database is notNormalized.To understand these anomalies let
us take an example of Student table.
S_id S_Name S_Address Subject_opted
401 Adam Noida Bio
402 Alex Panipat Maths
403 Stuart Jammu Maths
404 Adam Noida Physics
 Updation Anamoly : To update address ofa studentwho occurs twice or more than twice in a table,we will have
to update S_Address column in all the rows,else data will become inconsistent.
 Insertion Anamoly : Suppose for a new admission,we have a Studentid(S_id),name and address ofa student
but if studenthas not opted for any subjects yet then we have to insert NULL there, leading to Insertion Anamoly.
 Deletion Anamoly : If (S_id) 401 has only one subjectand temporarilyhe drops it, when we delete that row,
entire studentrecord will be deleted along with it.
Normalization Rule
Normalization rule are divided into following normal form.
1. First Normal Form
2. Second Normal Form
3. Third Normal Form
4. BCNF
First Normal Form (1NF)
As per First Normal Form,no two Rows of data mustcontain repeating group ofinformation i.e each setof column
musthave a unique value,such that multiple columns cannotbe used to fetch the same row.Each table should be
organized into rows,and each row should have a primary key that distinguishes itas unique.
The Primary key is usuallya single column,butsometimes more than one column can be combined to create a
single primarykey. For example consider a table which is not in First normal form
Student Table :
Student Age Subject
Adam 15 Biology, Maths
Alex 14 Maths
Stuart 17 Maths
In First Normal Form,any row mustnot have a column in which more than one value is saved, like separated with
commas.Rather than that, we mustseparate such data into multiple rows.
Student Table following 1NF will be :
Student Age Subject
Adam 15 Biology
Adam 15 Maths
Alex 14 Maths
Stuart 17 Maths
Using the First Normal Form,data redundancyincreases,as there will be manycolumns with same data in multiple
rows but each row as a whole will be unique.
Second Normal Form (2NF)
As per the Second Normal Form there mustnot be any partial dependencyof any column on primarykey. It means
that for a table that has concatenated primarykey, each column in the table that is not part of the primarykey must
depend upon the entire concatenated key for its existence.If any column depends onlyon one part of the
concatenated key, then the table fails Second normal form.
In example of First Normal Form there are two rows for Adam, to include multiple subjects thathe has opted for.
While this is searchable,and follows Firstnormal form,it is an inefficientuse of space.Also in the above Table in
First Normal Form,while the candidate key is {Student, Subject}, Age of Student only depends on Studentcolumn,
which is incorrectas per Second Normal Form.To achieve second normal form,it would be helpful to splitout the
subjects into an independenttable,and match them up using the studentnames as foreign keys.
New Student Table following 2NF will be :
Student Age
Adam 15
Alex 14
Stuart 17
In Student Table the candidate key will be Student column,because all other column i.e Age is dependenton it.
New Subject Table introduced for 2NF will be :
Student Subject
Adam Biology
Adam Maths
Alex Maths
Stuart Maths
In Subject Table the candidate key will be {Student, Subject} column.Now,both the above tables qualifies for
Second Normal Form and will never suffer from Update Anomalies.Although there are a few complexcases in which
table in Second Normal Form suffers Update Anomalies,and to handle those scenarios Third Normal Form is there.
Third Normal Form (3NF)
Third Normal form applies thatevery non-prime attribute of table mustbe dependenton primarykey, or we can say
that, there should notbe the case that a non-prime attribute is determined byanother non-prime attribute.So
this transitive functional dependency should be removed from the table and also the table mustbe in Second Normal
form. For example,consider a table with following fields.
Student_Detail Table :
Student_id Student_name DOB Street city State Zip
In this table Student_id is Primarykey, but street,city and state depends upon Zip.The dependencybetween zip and
other fields is called transitive dependency. Hence to apply 3NF, we need to move the street,city and state to new
table, with Zip as primarykey.
New Student_Detail Table :
Student_id Student_name DOB Zip
Address Table :
Zip Street city state
The advantage of removing transtive dependencyis,
 Amount of data duplication is reduced.
 Data integrity achieved.
Boyce and Codd Normal Form (BCNF)
Boyce and Codd Normal Form is a higher version of the Third Normal form.This form deals with certain type of
anamolythat is not handled by 3NF. A 3NF table which does not have multiple overlapping candidate keys is said to
be in BCNF. For a table to be in BCNF, following conditions mustbe satisfied:
 R mustbe in 3rd Normal Form
 and, for each functional dependency( X -> Y ), X should be a super Key.
Ad

More Related Content

What's hot (20)

Relationships within the relational database
Relationships within the relational databaseRelationships within the relational database
Relationships within the relational database
Janecatalla
 
Normalization
NormalizationNormalization
Normalization
Shakila Mahjabin
 
Normalization
NormalizationNormalization
Normalization
Ahmed Farag
 
Database normalization
Database normalizationDatabase normalization
Database normalization
Vaibhav Kathuria
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
A. S. M. Shafi
 
Normalization
NormalizationNormalization
Normalization
Samir Sabry
 
Year 11 DATA PROCESSING 1st Term
Year 11 DATA PROCESSING 1st TermYear 11 DATA PROCESSING 1st Term
Year 11 DATA PROCESSING 1st Term
Isaac-Joseph Olanrewaju
 
Dbms 4NF & 5NF
Dbms 4NF & 5NFDbms 4NF & 5NF
Dbms 4NF & 5NF
Soham Kansodaria
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
Muthu Natarajan
 
Database Relationships
Database RelationshipsDatabase Relationships
Database Relationships
wmassie
 
Normalization in databases
Normalization in databasesNormalization in databases
Normalization in databases
baabtra.com - No. 1 supplier of quality freshers
 
Database Normalization by Dr. Kamal Gulati
Database Normalization by Dr. Kamal GulatiDatabase Normalization by Dr. Kamal Gulati
Database Normalization by Dr. Kamal Gulati
Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU
 
Persentation of SAD 2
Persentation of SAD 2Persentation of SAD 2
Persentation of SAD 2
Khaled Salmeen BAzqameh
 
Joins and unions
Joins and unionsJoins and unions
Joins and unions
baabtra.com - No. 1 supplier of quality freshers
 
Sql joins
Sql joinsSql joins
Sql joins
LokeshGogia2
 
Advance Sqlite3
Advance Sqlite3Advance Sqlite3
Advance Sqlite3
Raghu nath
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
Bishrul Haq
 
Solutions manual for guide to sql 9th edition by pratt
Solutions manual for guide to sql 9th edition by prattSolutions manual for guide to sql 9th edition by pratt
Solutions manual for guide to sql 9th edition by pratt
Aldis8862
 
Normalization,1st NF, 2nd NF, 3rd NF, BCNF, 4th NF, 5th NF
Normalization,1st NF, 2nd NF, 3rd NF, BCNF, 4th NF, 5th NF Normalization,1st NF, 2nd NF, 3rd NF, BCNF, 4th NF, 5th NF
Normalization,1st NF, 2nd NF, 3rd NF, BCNF, 4th NF, 5th NF
Harsh Parmar
 
Jai dbms
Jai dbmsJai dbms
Jai dbms
JAI BAMORIYA
 
Relationships within the relational database
Relationships within the relational databaseRelationships within the relational database
Relationships within the relational database
Janecatalla
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
A. S. M. Shafi
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
Muthu Natarajan
 
Database Relationships
Database RelationshipsDatabase Relationships
Database Relationships
wmassie
 
Advance Sqlite3
Advance Sqlite3Advance Sqlite3
Advance Sqlite3
Raghu nath
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
Bishrul Haq
 
Solutions manual for guide to sql 9th edition by pratt
Solutions manual for guide to sql 9th edition by prattSolutions manual for guide to sql 9th edition by pratt
Solutions manual for guide to sql 9th edition by pratt
Aldis8862
 
Normalization,1st NF, 2nd NF, 3rd NF, BCNF, 4th NF, 5th NF
Normalization,1st NF, 2nd NF, 3rd NF, BCNF, 4th NF, 5th NF Normalization,1st NF, 2nd NF, 3rd NF, BCNF, 4th NF, 5th NF
Normalization,1st NF, 2nd NF, 3rd NF, BCNF, 4th NF, 5th NF
Harsh Parmar
 

Similar to Normalization (20)

What is Database NormalizationExplain the guidelines for ensuring t.pdf
What is Database NormalizationExplain the guidelines for ensuring t.pdfWhat is Database NormalizationExplain the guidelines for ensuring t.pdf
What is Database NormalizationExplain the guidelines for ensuring t.pdf
arjunstores123
 
Normalization.pptx
Normalization.pptxNormalization.pptx
Normalization.pptx
Sreenivas R
 
Normalization in Relational database management systems
Normalization in Relational database management systemsNormalization in Relational database management systems
Normalization in Relational database management systems
backiyalakshmi14
 
Normalization in rdbms types and examples
Normalization in rdbms types and examplesNormalization in rdbms types and examples
Normalization in rdbms types and examples
BackiyalakshmiVenkat
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
ijtsrd
 
1683368767418684.pdf
1683368767418684.pdf1683368767418684.pdf
1683368767418684.pdf
Janoakre
 
Research gadot
Research gadotResearch gadot
Research gadot
Jotham Gadot
 
Normalization and three normal forms.pptx
Normalization and three normal forms.pptxNormalization and three normal forms.pptx
Normalization and three normal forms.pptx
Zoha681526
 
DBMS_Module 3_Functional Dependencies and Normalization.pptx
DBMS_Module 3_Functional Dependencies and Normalization.pptxDBMS_Module 3_Functional Dependencies and Normalization.pptx
DBMS_Module 3_Functional Dependencies and Normalization.pptx
shruthis866876
 
Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
DilanAlmsa
 
DATABASE DESIGN.pptx
DATABASE DESIGN.pptxDATABASE DESIGN.pptx
DATABASE DESIGN.pptx
SaranCreations
 
normalization ppt.pptx
normalization ppt.pptxnormalization ppt.pptx
normalization ppt.pptx
AbdusSadik
 
Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.ppt
NIDHISAHU71
 
09.01 normalization
09.01 normalization09.01 normalization
09.01 normalization
Bishal Ghimire
 
Types of normalization
Types of normalizationTypes of normalization
Types of normalization
PratibhaRashmiSingh
 
Normalization
NormalizationNormalization
Normalization
Prabal Chauhan
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
kshipra sony
 
Database Normalization.docx
Database Normalization.docxDatabase Normalization.docx
Database Normalization.docx
SHARMISTHAlearning
 
normalization of database management ppt
normalization of database management pptnormalization of database management ppt
normalization of database management ppt
RabiaKabir
 
What is Database NormalizationExplain the guidelines for ensuring t.pdf
What is Database NormalizationExplain the guidelines for ensuring t.pdfWhat is Database NormalizationExplain the guidelines for ensuring t.pdf
What is Database NormalizationExplain the guidelines for ensuring t.pdf
arjunstores123
 
Normalization.pptx
Normalization.pptxNormalization.pptx
Normalization.pptx
Sreenivas R
 
Normalization in Relational database management systems
Normalization in Relational database management systemsNormalization in Relational database management systems
Normalization in Relational database management systems
backiyalakshmi14
 
Normalization in rdbms types and examples
Normalization in rdbms types and examplesNormalization in rdbms types and examples
Normalization in rdbms types and examples
BackiyalakshmiVenkat
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
ijtsrd
 
1683368767418684.pdf
1683368767418684.pdf1683368767418684.pdf
1683368767418684.pdf
Janoakre
 
Normalization and three normal forms.pptx
Normalization and three normal forms.pptxNormalization and three normal forms.pptx
Normalization and three normal forms.pptx
Zoha681526
 
DBMS_Module 3_Functional Dependencies and Normalization.pptx
DBMS_Module 3_Functional Dependencies and Normalization.pptxDBMS_Module 3_Functional Dependencies and Normalization.pptx
DBMS_Module 3_Functional Dependencies and Normalization.pptx
shruthis866876
 
Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
DilanAlmsa
 
normalization ppt.pptx
normalization ppt.pptxnormalization ppt.pptx
normalization ppt.pptx
AbdusSadik
 
Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.ppt
NIDHISAHU71
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
kshipra sony
 
normalization of database management ppt
normalization of database management pptnormalization of database management ppt
normalization of database management ppt
RabiaKabir
 
Ad

Recently uploaded (20)

BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
Ad

Normalization

  • 1. Normalization of Database Database Normalisation is a technique oforganizing the data in the database.Normalization is a systematic approach of decomposing tables to eliminate data redundancyand undesirable characteristics like Insertion,Update and Deletion Anamolies.Itis a multi-step process that puts data into tabular form by removing duplicated data from the relation tables. Normalization is used for mainlytwo purpose,  Eliminating reduntant(useless) data.  Ensuring data dependencies make sense i.e data is logicallystored. Problem Without Normalization Without Normalization,itbecomes difficultto handle and update the database,withoutfacing data loss.Insertion, Updation and Deletion Anamolies are very frequent if Database is notNormalized.To understand these anomalies let us take an example of Student table. S_id S_Name S_Address Subject_opted 401 Adam Noida Bio 402 Alex Panipat Maths 403 Stuart Jammu Maths 404 Adam Noida Physics  Updation Anamoly : To update address ofa studentwho occurs twice or more than twice in a table,we will have to update S_Address column in all the rows,else data will become inconsistent.  Insertion Anamoly : Suppose for a new admission,we have a Studentid(S_id),name and address ofa student but if studenthas not opted for any subjects yet then we have to insert NULL there, leading to Insertion Anamoly.  Deletion Anamoly : If (S_id) 401 has only one subjectand temporarilyhe drops it, when we delete that row, entire studentrecord will be deleted along with it.
  • 2. Normalization Rule Normalization rule are divided into following normal form. 1. First Normal Form 2. Second Normal Form 3. Third Normal Form 4. BCNF First Normal Form (1NF) As per First Normal Form,no two Rows of data mustcontain repeating group ofinformation i.e each setof column musthave a unique value,such that multiple columns cannotbe used to fetch the same row.Each table should be organized into rows,and each row should have a primary key that distinguishes itas unique. The Primary key is usuallya single column,butsometimes more than one column can be combined to create a single primarykey. For example consider a table which is not in First normal form Student Table : Student Age Subject Adam 15 Biology, Maths Alex 14 Maths Stuart 17 Maths In First Normal Form,any row mustnot have a column in which more than one value is saved, like separated with commas.Rather than that, we mustseparate such data into multiple rows. Student Table following 1NF will be : Student Age Subject Adam 15 Biology Adam 15 Maths
  • 3. Alex 14 Maths Stuart 17 Maths Using the First Normal Form,data redundancyincreases,as there will be manycolumns with same data in multiple rows but each row as a whole will be unique. Second Normal Form (2NF) As per the Second Normal Form there mustnot be any partial dependencyof any column on primarykey. It means that for a table that has concatenated primarykey, each column in the table that is not part of the primarykey must depend upon the entire concatenated key for its existence.If any column depends onlyon one part of the concatenated key, then the table fails Second normal form. In example of First Normal Form there are two rows for Adam, to include multiple subjects thathe has opted for. While this is searchable,and follows Firstnormal form,it is an inefficientuse of space.Also in the above Table in First Normal Form,while the candidate key is {Student, Subject}, Age of Student only depends on Studentcolumn, which is incorrectas per Second Normal Form.To achieve second normal form,it would be helpful to splitout the subjects into an independenttable,and match them up using the studentnames as foreign keys. New Student Table following 2NF will be : Student Age Adam 15 Alex 14 Stuart 17 In Student Table the candidate key will be Student column,because all other column i.e Age is dependenton it. New Subject Table introduced for 2NF will be : Student Subject Adam Biology Adam Maths
  • 4. Alex Maths Stuart Maths In Subject Table the candidate key will be {Student, Subject} column.Now,both the above tables qualifies for Second Normal Form and will never suffer from Update Anomalies.Although there are a few complexcases in which table in Second Normal Form suffers Update Anomalies,and to handle those scenarios Third Normal Form is there. Third Normal Form (3NF) Third Normal form applies thatevery non-prime attribute of table mustbe dependenton primarykey, or we can say that, there should notbe the case that a non-prime attribute is determined byanother non-prime attribute.So this transitive functional dependency should be removed from the table and also the table mustbe in Second Normal form. For example,consider a table with following fields. Student_Detail Table : Student_id Student_name DOB Street city State Zip In this table Student_id is Primarykey, but street,city and state depends upon Zip.The dependencybetween zip and other fields is called transitive dependency. Hence to apply 3NF, we need to move the street,city and state to new table, with Zip as primarykey. New Student_Detail Table : Student_id Student_name DOB Zip Address Table : Zip Street city state The advantage of removing transtive dependencyis,  Amount of data duplication is reduced.  Data integrity achieved. Boyce and Codd Normal Form (BCNF)
  • 5. Boyce and Codd Normal Form is a higher version of the Third Normal form.This form deals with certain type of anamolythat is not handled by 3NF. A 3NF table which does not have multiple overlapping candidate keys is said to be in BCNF. For a table to be in BCNF, following conditions mustbe satisfied:  R mustbe in 3rd Normal Form  and, for each functional dependency( X -> Y ), X should be a super Key.
  翻译: