SlideShare a Scribd company logo
MCA, MSc(CS), PGDCA
Pratibha Rashmi
 First Normal Form (1NF)
 Second Normal Form (2NF)
 Third Normal Form (3NF)
 Boyce-Codd Normal Form (BCNF) Boyce-Codd Normal Form (BCNF)
 Fourth Normal Form (4NF)
 Fifth Normal Form (5NF)
Note: The database designers don’t have
to normalize relations to the highest
possible normal form (usually 3NF, BCNF
or 4NF is enough)
First normal form enforces these criteria:
 Eliminate repeating groups in individual
tables.
 Create a separate table for each set of
related data.related data.
 Identify each set of related data with a
primary key.
 Each set of column must have a unique
value.
 It contains atomic values because the table
cannot hold multiple values.
tb_Product
p_id colour cost
1 Red, yellow 3000
2 Blue 2000
3 Green, Red 2030
This table is not in first normal form because the
“Colour” column contains multiple Values.
p_id cost
1 3000
2 2000
3 2030
p_id Colour
1 Red
1 Yellow
2 Blue
3 Green
3 Red
A table is said to be in 2NF if both the
following conditions hold:
 Table is in 1NF (First normal form). Table is in 1NF (First normal form).
 No non-prime attribute is dependent on the
proper subset of any candidate key of table.
 Non-prime attribute-An attribute that is not
part of any candidate key is known as non-
prime attribute.
 Or in other words A relation R is said to be in
2NF if it is in 1NF and if all nono-prime
attributes are not partially dependent on
candidate key ie all non- prime attribute
must be fully functionally dependent on
candidate key.
must be fully functionally dependent on
candidate key.
 Partially dependency: In a relationa R XY->Z
is said to be partial FD if either X->Z or Y->Z
exists in R.
 On other hand In a relationa R XY->Z is said
to be fully FD if neither X->Z nor Y->Z exists
in R.
 We use a teacher table that have teacher id,
subject and age. Since a teacher can teach more
than one subjects, the table can have multiple
rows for a same teacher.
tb_teacher
t_id subject t_aget_id subject t_age
1 DBMS 40
1 Networking 40
2 OS 38
2 DM 38
3 AI 42
* Candidate Keys: {t_id, subject}
* Non prime attribute: t_age
 This table is in 1 NF because each attribute
has atomic values.
 But, it is not in 2NF because non prime
attribute t_age is dependent on t_id alone
which is a proper subset of candidate key.
This violates the rule for 2NF as the rule says
“no non-prime attribute is dependent on the
proper subset of any candidate key of theproper subset of any candidate key of the
table”.
 To make the table complies with 2NF we can
break it in two tables , eg. t_details and
t_subject.
 Table 1: t_details
t_details
t_id t_age
1 40
2 38
3 42
 Table 2: t_subject
t_subject
t_id subject
1 DBMS
1 Networking
2 OS
2 DM
3 AI
Now the tables execute with Second normal form (2NF).
 Third Normal Form (3NF) is used to minimize
the transitive redundancy.
 In 3NF, the table is required in 2NF.
 While using the 2NF table, there should not
be any transitive partial dependency.be any transitive partial dependency.
 3NF reduces the duplication of data and also
achieves the data integrity.
In other words: A table is in 3NF if it is in 2NF
and for each functional dependency X-> Y at
least one of the following conditions hold:
 X is a super key of table
 Y is a prime attribute of table
 Let’s take a table Student details with
attributes student id, name, city, district,
state, zip.
tb_Student
s_id s_name city district state zip
1 Jaunty Delhi Delhi Delhi 1100011 Jaunty Delhi Delhi Delhi 110001
2 Arnav Agra Agra UP 282005
3 Ram Aligarh Aligarh UP 200201
4 Reeta Meerut Meerut UP 250001
5 Sita Delhi Delhi Delhi 110013
Super keys: {s_id}, {s_id, s_name}, {s_id, s_name, zip}…....so on
Candidate Keys: {s_id}
Non-prime attributes: all attributes except s_id are non-prime
as they are not part of any candidate keys.
 Here, state, city and district dependent on
zip. And, zip is dependent on s_id that makes
non-prime attributes (state, city and district)
transitively dependent on super key (s_id).
This violates the rule of 3NF.
 To make this table complies with 3NF we
have to break the table into two tables to
remove the transitive dependency:
tb_Student
s_id s_name zip
1 Jaunty 110001
2 Arnav 282005
3 Ram 200201
4 Reeta 250001
5 Sita 110013
tb_Zip
zip city district state
110001 Delhi Delhi Delhi
282005 Agra Agra UP
200201 Aligarh Aligarh UP
250001 Meerut Meerut UP
110013 Delhi Delhi Delhi
 Even when a database is in 3rd Normal
Form, still there would be anomalies resulted
if it has more than one Candidate Key.
 BCNF is an advance version of 3NF that’s why
it is also referred as 3.5NF.it is also referred as 3.5NF.
 BCNF is stricter than 3NF.
 A table complies with BCNF if it is in 3NF
and for every functional dependency X->Y, X
should be the super key of the table.
 Let's assume there is a company where
employees work in more than one
department.
tb_employee
e_id e_country e_dept dept_type e_dept_id
1 India Sales D003 1003
1 India Account D003 10081 India Account D003 1008
2 USA Developing D001 1001
2 USA Designing D001 1006
3 UK Sales D003 1007
In the above table Functional dependencies are as follows:
e_id → e_country
e_dept → {dept_type, e_dept_id}
Candidate key: {e_id, e_dept}
The table is not in BCNF because neither e_dept nor e_id alone
are keys.
 To convert the given table into BCNF, we
decompose it into three tables:
tb_emp_country
e_id e_country
1 India
2 USA
3 UK
tb_emp_dept
e_dept dept_type e_dept_id
Sales D003 1003
Table 1:
Table 2:
3 UK Sales D003 1003
Account D003 1008
Developing D001 1001
Designing D001 1006
Sales D003 1007
tb_emp_dept_mapping
e_id e_dept
1 Sales
1 Account
2 Developing
2 Designing
3 Sales
Table 3:
 Functional dependencies:
e_id → e_country
e_dept → {dept_type, e_dept_id}
 Candidate keys:
For the first table: e_id
For the second table: e_dept
For the third table: {e_id, e_dept}
 Now, this is in BCNF because left side part of
both the functional dependencies is a key.
 Ques 1: What is normalization? What are
different type of normalization?
 Ques 2: Define Prime and Non - prime
attributes.
Ques 3: Why do we use normalized database? Ques 3: Why do we use normalized database?
 Ques 4: Define partial and full dependency.
 Ques 5: Define normalization. Explain INF,
2NF, and 3NF using appropriate example.
 Ques 6: differentiate between 3NF and BCNF.
Types of normalization

More Related Content

What's hot

Normalization
NormalizationNormalization
Normalization
momo2187
 
Decomposition using Functional Dependency
Decomposition using Functional DependencyDecomposition using Functional Dependency
Decomposition using Functional Dependency
Raj Naik
 
Normalisation muzz
Normalisation muzzNormalisation muzz
Normalisation muzz
muzzii27
 
Normalization
NormalizationNormalization
Normalization
Salman Memon
 
Referential integrity
Referential integrityReferential integrity
Referential integrity
Jubin Raju
 
11. transaction sql
11. transaction sql11. transaction sql
11. transaction sqlUmang Gupta
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
Dashani Rajapaksha
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
Oum Saokosal
 
Relational Algebra,Types of join
Relational Algebra,Types of joinRelational Algebra,Types of join
Relational Algebra,Types of join
raj upadhyay
 
relational algebra
relational algebrarelational algebra
relational algebra
Shashank Singh
 
DBMS Question bank
DBMS Question bankDBMS Question bank
DBMS Question bank
Sara Sahu
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
Jargalsaikhan Alyeksandr
 
MySql Triggers Tutorial - The Webs Academy
MySql Triggers Tutorial - The Webs AcademyMySql Triggers Tutorial - The Webs Academy
MySql Triggers Tutorial - The Webs Academy
thewebsacademy
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraints
Nikhil Deswal
 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management System
Kevin Jadiya
 
ER model
ER modelER model
ER model
ShilpaDe
 

What's hot (20)

Normalization
NormalizationNormalization
Normalization
 
Decomposition using Functional Dependency
Decomposition using Functional DependencyDecomposition using Functional Dependency
Decomposition using Functional Dependency
 
Joins And Its Types
Joins And Its TypesJoins And Its Types
Joins And Its Types
 
Normalisation muzz
Normalisation muzzNormalisation muzz
Normalisation muzz
 
Normalization
NormalizationNormalization
Normalization
 
Referential integrity
Referential integrityReferential integrity
Referential integrity
 
11. transaction sql
11. transaction sql11. transaction sql
11. transaction sql
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Relational Algebra,Types of join
Relational Algebra,Types of joinRelational Algebra,Types of join
Relational Algebra,Types of join
 
relational algebra
relational algebrarelational algebra
relational algebra
 
Normalization in databases
Normalization in databasesNormalization in databases
Normalization in databases
 
DBMS Question bank
DBMS Question bankDBMS Question bank
DBMS Question bank
 
Anomalies in database
Anomalies in databaseAnomalies in database
Anomalies in database
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
MySql Triggers Tutorial - The Webs Academy
MySql Triggers Tutorial - The Webs AcademyMySql Triggers Tutorial - The Webs Academy
MySql Triggers Tutorial - The Webs Academy
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraints
 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management System
 
ER model
ER modelER model
ER model
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 

Similar to Types of normalization

Assignment#11
Assignment#11Assignment#11
Assignment#11
Sunita Milind Dol
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
ijtsrd
 
Dbms final quiz1
Dbms final quiz1Dbms final quiz1
Dbms final quiz1
nanmannit
 
Database normalization
Database normalizationDatabase normalization
Database normalization
Vaibhav Kathuria
 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5
Infinity Tech Solutions
 
Normalization
NormalizationNormalization
Normalization
Prabal Chauhan
 
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
wrushabhsirsat
 
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdffunctionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
Anvesha Joshi
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
kshipra sony
 
DBMS Helping material
DBMS Helping materialDBMS Helping material
DBMS Helping material
ZarlishAttique1
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalizationdaxesh chauhan
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
A. S. M. Shafi
 
Database design normalization note and exercise
Database design normalization note and exerciseDatabase design normalization note and exercise
Database design normalization note and exercise
dilnawaz56788
 
normalization ppt.pptx
normalization ppt.pptxnormalization ppt.pptx
normalization ppt.pptx
AbdusSadik
 
Normal forms.ppt
Normal forms.pptNormal forms.ppt
Normal forms.ppt
keerthanakommera1
 
24042020_normalization 1.pdf
24042020_normalization 1.pdf24042020_normalization 1.pdf
24042020_normalization 1.pdf
Shivani139202
 
1-161103092724 (1).pdf
1-161103092724 (1).pdf1-161103092724 (1).pdf
1-161103092724 (1).pdf
BasirKhan21
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Prateek Parimal
 
Normalization.pptx
Normalization.pptxNormalization.pptx
Normalization.pptx
Sreenivas R
 

Similar to Types of normalization (20)

Assignment#11
Assignment#11Assignment#11
Assignment#11
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
 
Dbms final quiz1
Dbms final quiz1Dbms final quiz1
Dbms final quiz1
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5
 
Normalization
NormalizationNormalization
Normalization
 
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
1-161103092724.pzxsdfdsdrgdrgdfgdfgdfgdfgptx
 
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdffunctionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
 
DBMS Helping material
DBMS Helping materialDBMS Helping material
DBMS Helping material
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
 
Database design normalization note and exercise
Database design normalization note and exerciseDatabase design normalization note and exercise
Database design normalization note and exercise
 
normalization ppt.pptx
normalization ppt.pptxnormalization ppt.pptx
normalization ppt.pptx
 
Normal forms.ppt
Normal forms.pptNormal forms.ppt
Normal forms.ppt
 
24042020_normalization 1.pdf
24042020_normalization 1.pdf24042020_normalization 1.pdf
24042020_normalization 1.pdf
 
1-161103092724 (1).pdf
1-161103092724 (1).pdf1-161103092724 (1).pdf
1-161103092724 (1).pdf
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Normalization.pptx
Normalization.pptxNormalization.pptx
Normalization.pptx
 

More from PratibhaRashmiSingh

Concurrency control
Concurrency controlConcurrency control
Concurrency control
PratibhaRashmiSingh
 
Transaction
TransactionTransaction
Transaction
PratibhaRashmiSingh
 
Schedule in DBMS
Schedule in DBMSSchedule in DBMS
Schedule in DBMS
PratibhaRashmiSingh
 
Normalization
NormalizationNormalization
Normalization
PratibhaRashmiSingh
 
Data manipulation language
Data manipulation languageData manipulation language
Data manipulation language
PratibhaRashmiSingh
 
Sql
SqlSql

More from PratibhaRashmiSingh (6)

Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Transaction
TransactionTransaction
Transaction
 
Schedule in DBMS
Schedule in DBMSSchedule in DBMS
Schedule in DBMS
 
Normalization
NormalizationNormalization
Normalization
 
Data manipulation language
Data manipulation languageData manipulation language
Data manipulation language
 
Sql
SqlSql
Sql
 

Recently uploaded

"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 

Recently uploaded (20)

"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 

Types of normalization

  • 2.  First Normal Form (1NF)  Second Normal Form (2NF)  Third Normal Form (3NF)  Boyce-Codd Normal Form (BCNF) Boyce-Codd Normal Form (BCNF)  Fourth Normal Form (4NF)  Fifth Normal Form (5NF) Note: The database designers don’t have to normalize relations to the highest possible normal form (usually 3NF, BCNF or 4NF is enough)
  • 3. First normal form enforces these criteria:  Eliminate repeating groups in individual tables.  Create a separate table for each set of related data.related data.  Identify each set of related data with a primary key.  Each set of column must have a unique value.  It contains atomic values because the table cannot hold multiple values.
  • 4. tb_Product p_id colour cost 1 Red, yellow 3000 2 Blue 2000 3 Green, Red 2030 This table is not in first normal form because the “Colour” column contains multiple Values.
  • 5. p_id cost 1 3000 2 2000 3 2030 p_id Colour 1 Red 1 Yellow 2 Blue 3 Green 3 Red
  • 6. A table is said to be in 2NF if both the following conditions hold:  Table is in 1NF (First normal form). Table is in 1NF (First normal form).  No non-prime attribute is dependent on the proper subset of any candidate key of table.  Non-prime attribute-An attribute that is not part of any candidate key is known as non- prime attribute.
  • 7.  Or in other words A relation R is said to be in 2NF if it is in 1NF and if all nono-prime attributes are not partially dependent on candidate key ie all non- prime attribute must be fully functionally dependent on candidate key. must be fully functionally dependent on candidate key.  Partially dependency: In a relationa R XY->Z is said to be partial FD if either X->Z or Y->Z exists in R.  On other hand In a relationa R XY->Z is said to be fully FD if neither X->Z nor Y->Z exists in R.
  • 8.  We use a teacher table that have teacher id, subject and age. Since a teacher can teach more than one subjects, the table can have multiple rows for a same teacher. tb_teacher t_id subject t_aget_id subject t_age 1 DBMS 40 1 Networking 40 2 OS 38 2 DM 38 3 AI 42 * Candidate Keys: {t_id, subject} * Non prime attribute: t_age
  • 9.  This table is in 1 NF because each attribute has atomic values.  But, it is not in 2NF because non prime attribute t_age is dependent on t_id alone which is a proper subset of candidate key. This violates the rule for 2NF as the rule says “no non-prime attribute is dependent on the proper subset of any candidate key of theproper subset of any candidate key of the table”.  To make the table complies with 2NF we can break it in two tables , eg. t_details and t_subject.
  • 10.  Table 1: t_details t_details t_id t_age 1 40 2 38 3 42  Table 2: t_subject t_subject t_id subject 1 DBMS 1 Networking 2 OS 2 DM 3 AI Now the tables execute with Second normal form (2NF).
  • 11.  Third Normal Form (3NF) is used to minimize the transitive redundancy.  In 3NF, the table is required in 2NF.  While using the 2NF table, there should not be any transitive partial dependency.be any transitive partial dependency.  3NF reduces the duplication of data and also achieves the data integrity. In other words: A table is in 3NF if it is in 2NF and for each functional dependency X-> Y at least one of the following conditions hold:  X is a super key of table  Y is a prime attribute of table
  • 12.  Let’s take a table Student details with attributes student id, name, city, district, state, zip. tb_Student s_id s_name city district state zip 1 Jaunty Delhi Delhi Delhi 1100011 Jaunty Delhi Delhi Delhi 110001 2 Arnav Agra Agra UP 282005 3 Ram Aligarh Aligarh UP 200201 4 Reeta Meerut Meerut UP 250001 5 Sita Delhi Delhi Delhi 110013 Super keys: {s_id}, {s_id, s_name}, {s_id, s_name, zip}…....so on Candidate Keys: {s_id} Non-prime attributes: all attributes except s_id are non-prime as they are not part of any candidate keys.
  • 13.  Here, state, city and district dependent on zip. And, zip is dependent on s_id that makes non-prime attributes (state, city and district) transitively dependent on super key (s_id). This violates the rule of 3NF.  To make this table complies with 3NF we have to break the table into two tables to remove the transitive dependency: tb_Student s_id s_name zip 1 Jaunty 110001 2 Arnav 282005 3 Ram 200201 4 Reeta 250001 5 Sita 110013 tb_Zip zip city district state 110001 Delhi Delhi Delhi 282005 Agra Agra UP 200201 Aligarh Aligarh UP 250001 Meerut Meerut UP 110013 Delhi Delhi Delhi
  • 14.  Even when a database is in 3rd Normal Form, still there would be anomalies resulted if it has more than one Candidate Key.  BCNF is an advance version of 3NF that’s why it is also referred as 3.5NF.it is also referred as 3.5NF.  BCNF is stricter than 3NF.  A table complies with BCNF if it is in 3NF and for every functional dependency X->Y, X should be the super key of the table.
  • 15.  Let's assume there is a company where employees work in more than one department. tb_employee e_id e_country e_dept dept_type e_dept_id 1 India Sales D003 1003 1 India Account D003 10081 India Account D003 1008 2 USA Developing D001 1001 2 USA Designing D001 1006 3 UK Sales D003 1007 In the above table Functional dependencies are as follows: e_id → e_country e_dept → {dept_type, e_dept_id} Candidate key: {e_id, e_dept} The table is not in BCNF because neither e_dept nor e_id alone are keys.
  • 16.  To convert the given table into BCNF, we decompose it into three tables: tb_emp_country e_id e_country 1 India 2 USA 3 UK tb_emp_dept e_dept dept_type e_dept_id Sales D003 1003 Table 1: Table 2: 3 UK Sales D003 1003 Account D003 1008 Developing D001 1001 Designing D001 1006 Sales D003 1007 tb_emp_dept_mapping e_id e_dept 1 Sales 1 Account 2 Developing 2 Designing 3 Sales Table 3:
  • 17.  Functional dependencies: e_id → e_country e_dept → {dept_type, e_dept_id}  Candidate keys: For the first table: e_id For the second table: e_dept For the third table: {e_id, e_dept}  Now, this is in BCNF because left side part of both the functional dependencies is a key.
  • 18.
  • 19.  Ques 1: What is normalization? What are different type of normalization?  Ques 2: Define Prime and Non - prime attributes. Ques 3: Why do we use normalized database? Ques 3: Why do we use normalized database?  Ques 4: Define partial and full dependency.  Ques 5: Define normalization. Explain INF, 2NF, and 3NF using appropriate example.  Ques 6: differentiate between 3NF and BCNF.