SlideShare a Scribd company logo
NORMALIZATION
M.SandhiyaM.SC(IT)
Department of CS&IT
Nadar Saraswathi College of Arts Science
Theni
Normalization
• Normalization is a database design technique which
organizes tables in a manner that reduces redundancy
and dependency of data.
• It divides larger tables to smaller tables and links them
using relationships.
• Normalization is the process of
minimizing redundancy from a relation or set of
relations. Redundancy in relation may cause insertion,
deletion and updation anomalies
• . So, it helps to minimize the redundancy in
relations. Normal forms are used to eliminate or
reduce redundancy in database tables.
Type of normal
Normal Form Description
1NF A relation is in 1NF if it contains an atomic
value.
2NF A relation will be in 2NF if it is in 1NF and all
non-key attributes are fully functional
dependent on the primary key.
3NF A relation will be in 3NF if it is in 2NF and no
transition dependency exists.
4NF A relation will be in 4NF if it is in Boyce Codd
normal form and has no multi-valued
dependency.
5NF A relation is in 5NF if it is in 4NF and not
contains any join dependency and joining
should be lossless.
Normalization
Database Normalization Examples -
First Normal Form
• If a relation contain composite or multi-valued
attribute, it violates first normal form or a
relation is in first normal form if it does not
contain any composite or multi-valued
attribute. A relation is in first normal form if
every attribute in that relation is singled
valued attribute.
•
First Normal Form example
First Normal Form example
• Example 2 – ID Name Courses ------------------ 1
A c1, c2 2 E c3 3 M C2, c3
• In the above table Course is a multi valued
attribute so it is not in 1NF.
• Below Table is in 1NF as there is no multi
valued attribute
• ID Name Course ------------------ 1 A c1 1 A c2 2
E c3 3 M c1 3 M c2
Second Normal Form –
• To be in second normal form, a relation must
be in first normal form and relation must not
contain any partial dependency. A relation is
in 2NF iff it has No Partial
Dependency, i.e., no non-prime attribute
(attributes which are not part of any candidate
key) is dependent on any proper subset of any
candidate key of the table.
Second Normal Form example
Second Normal Form example
• Partial Dependency – If proper subset of candidate key determines
non-prime attribute, it is called partial dependency.
• Example 1 – In relation STUDENT_COURSE given in Table 3,FD set:
{COURSE_NO->COURSE_NAME} Candidate Key: {STUD_NO,
COURSE_NO} In FD COURSE_NO->COURSE_NAME, COURSE_NO
(proper subset of candidate key) is determining COURSE_NAME
(non-prime attribute). Hence, it is partial dependency and relation
is not in second normal form.
To convert it to second normal form, we will decompose the
relation STUDENT_COURSE (STUD_NO, COURSE_NO,
COURSE_NAME) as :
• STUDENT_COURSE (STUD_NO, COURSE_NO) COURSE (COURSE_NO,
COURSE_NAME) Note – This decomposition will be lossless join
decomposition as well as dependency preserving.
Third Normal Form
• A relation is in third normal form, if there is no
transitive dependency for non-prime attributes is
it is in second normal form.
A relation is in 3NF iff at least one of the
following condition holds in every non-trivial
function dependency X –> Y
1.X is a super key.
2.Y is a prime attribute (each element of Y is part of
some candidate key).
•
Third Normal Form Example
Third Normal Form Example
• Transitive dependency – If A->B and B->C are two FDs then A->C is
called transitive dependency.
– Example 1 – In relation STUDENT given in Table 4,FD set: {STUD_NO ->
STUD_NAME, STUD_NO -> STUD_STATE, STUD_STATE ->
STUD_COUNTRY, STUD_NO -> STUD_AGE, STUD_STATE ->
STUD_COUNTRY}
Candidate Key: {STUD_NO}
– For this relation in table 4, STUD_NO -> STUD_STATE and STUD_STATE
-> STUD_COUNTRY are true. So STUD_COUNTRY is transitively
dependent on STUD_NO. It violates third normal form. To convert it in
third normal form, we will decompose the relation STUDENT
(STUD_NO, STUD_NAME, STUD_PHONE, STUD_STATE,
STUD_COUNTRY_STUD_AGE) as:
STUDENT (STUD_NO, STUD_NAME, STUD_PHONE, STUD_STATE,
STUD_AGE)
STATE_COUNTRY (STATE, COUNTRY)
Boyce-Code Normal Form (BCNF) –
• A relation R is in BCNF if R is in Third Normal
Form and for every FD, LHS is super key.
• A relation is in BCNF iff in every non-trivial
functional dependency X –> Y, X is a super key.
Boyce-Code Normal Form (BCNF)
Example
• Example 1 – Find the highest normal form of a relation
R(A,B,C,D,E) with FD set as {BC->D, AC->BE, B->E}
Step 1. As we can see, (AC)+ ={A,C,B,E,D} but none of
its subset can determine all attribute of relation, So AC
will be candidate key. A or C can’t be derived from any
other attribute of the relation, so there will be only 1
candidate key {AC}.
Step 2. Prime attribute are those attribute which are
part of candidate key {A,C} in this example and others
will be non-prime {B,D,E} in this example.
Step 3. The relation R is in 1st normal form as a
relational DBMS does not allow multi-valued or
composite attribute.
Key Points
1.BCNF is free from redundancy.
2If a relation is in BCNF, then 3NF is also also
satisfied.
3. If all attributes of relation are prime attribute,
then the relation is always in 3NF.
4.A relation in a Relational Database is always and
at least in 1NF form.
5.Every Binary Relation ( a Relation with only 2
attributes ) is always in BCNF.

More Related Content

PPTX
Functional dependencies and normalization
PPTX
Introduction to data structure
PPT
Normalization
PPTX
Normalization
PPT
Lecture 04 normalization
PPTX
17.INTRODUCTION TO SCHEMA REFINEMENT.pptx
PPT
Sql joins
PPTX
Dbms normalization
Functional dependencies and normalization
Introduction to data structure
Normalization
Normalization
Lecture 04 normalization
17.INTRODUCTION TO SCHEMA REFINEMENT.pptx
Sql joins
Dbms normalization

What's hot (20)

PPTX
Unit 2 oracle9i
PPTX
Normalization in a Database
PPT
Databases: Normalisation
PPTX
RELATIONSHIP IN DBMS.pptx
PDF
Chapter 4 notes DBMS.pdf
PPTX
Normalization
PPTX
Unit - II.pptx
PPT
Database design
PPTX
1.4 data independence
PPTX
PDF
Database Normalization
PDF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
PPT
Normalization of database tables
PPTX
PPTX
File Structures(Part 2)
PPTX
Data Structures: Classification of Data Structures
PPT
Chapter 03 foreign key relationships1
PPTX
Functional dependency
PDF
Keys in DBMS
PPT
Introduction to SQL
Unit 2 oracle9i
Normalization in a Database
Databases: Normalisation
RELATIONSHIP IN DBMS.pptx
Chapter 4 notes DBMS.pdf
Normalization
Unit - II.pptx
Database design
1.4 data independence
Database Normalization
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization of database tables
File Structures(Part 2)
Data Structures: Classification of Data Structures
Chapter 03 foreign key relationships1
Functional dependency
Keys in DBMS
Introduction to SQL
Ad

Similar to Normalization (20)

PPTX
Normalization and three normal forms.pptx
PPTX
Normalization in data base management system.pptx
PPTX
Normalization in rdbms types and examples
PPTX
Normalization in Relational database management systems
PDF
Impact of Normalization in Future
PPTX
database Normalization
PPTX
Database Normalisation
PPTX
Normalization
PDF
Assignment#11
PPTX
Normalization
PPTX
DBMS: Week 10 - Database Design and Normalization
PPT
Normalization
DOCX
Research gadot
PDF
Database management system session 5
PDF
Types of normalization
PPTX
Normalization and its various types in DBMS
PPTX
PPTX
Computer Scinece:RDBMS :Normalisation
PPTX
Database normalization
PPTX
Normal Forms in Database Management Systems.pptx
Normalization and three normal forms.pptx
Normalization in data base management system.pptx
Normalization in rdbms types and examples
Normalization in Relational database management systems
Impact of Normalization in Future
database Normalization
Database Normalisation
Normalization
Assignment#11
Normalization
DBMS: Week 10 - Database Design and Normalization
Normalization
Research gadot
Database management system session 5
Types of normalization
Normalization and its various types in DBMS
Computer Scinece:RDBMS :Normalisation
Database normalization
Normal Forms in Database Management Systems.pptx
Ad

More from SanSan149 (11)

PPTX
Sdma fdma-tdma-fixed tdm
PPTX
Histogram process spatial filtering
PPTX
Mobile computing vani
PPTX
Telecommunication system gms mobile service
PPTX
Adaptive filters and band reject filters
PPTX
Hema rdbms
PPTX
SDMA-FDMA-TDMA-fixed TDM
PPTX
joins and subqueries in big data analysis
PPTX
Hadoop storage
PPTX
Manageral aspects of software maintance
PPTX
Common language runtime clr
Sdma fdma-tdma-fixed tdm
Histogram process spatial filtering
Mobile computing vani
Telecommunication system gms mobile service
Adaptive filters and band reject filters
Hema rdbms
SDMA-FDMA-TDMA-fixed TDM
joins and subqueries in big data analysis
Hadoop storage
Manageral aspects of software maintance
Common language runtime clr

Recently uploaded (20)

PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Indian roads congress 037 - 2012 Flexible pavement
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PDF
Empowerment Technology for Senior High School Guide
PPTX
Virtual and Augmented Reality in Current Scenario
PDF
1_English_Language_Set_2.pdf probationary
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PPTX
20th Century Theater, Methods, History.pptx
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
IGGE1 Understanding the Self1234567891011
PPTX
Introduction to Building Materials
What if we spent less time fighting change, and more time building what’s rig...
Indian roads congress 037 - 2012 Flexible pavement
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Weekly quiz Compilation Jan -July 25.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
TNA_Presentation-1-Final(SAVE)) (1).pptx
Empowerment Technology for Senior High School Guide
Virtual and Augmented Reality in Current Scenario
1_English_Language_Set_2.pdf probationary
FORM 1 BIOLOGY MIND MAPS and their schemes
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
20th Century Theater, Methods, History.pptx
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
IGGE1 Understanding the Self1234567891011
Introduction to Building Materials

Normalization

  • 1. NORMALIZATION M.SandhiyaM.SC(IT) Department of CS&IT Nadar Saraswathi College of Arts Science Theni
  • 2. Normalization • Normalization is a database design technique which organizes tables in a manner that reduces redundancy and dependency of data. • It divides larger tables to smaller tables and links them using relationships. • Normalization is the process of minimizing redundancy from a relation or set of relations. Redundancy in relation may cause insertion, deletion and updation anomalies • . So, it helps to minimize the redundancy in relations. Normal forms are used to eliminate or reduce redundancy in database tables.
  • 3. Type of normal Normal Form Description 1NF A relation is in 1NF if it contains an atomic value. 2NF A relation will be in 2NF if it is in 1NF and all non-key attributes are fully functional dependent on the primary key. 3NF A relation will be in 3NF if it is in 2NF and no transition dependency exists. 4NF A relation will be in 4NF if it is in Boyce Codd normal form and has no multi-valued dependency. 5NF A relation is in 5NF if it is in 4NF and not contains any join dependency and joining should be lossless.
  • 6. First Normal Form • If a relation contain composite or multi-valued attribute, it violates first normal form or a relation is in first normal form if it does not contain any composite or multi-valued attribute. A relation is in first normal form if every attribute in that relation is singled valued attribute. •
  • 8. First Normal Form example • Example 2 – ID Name Courses ------------------ 1 A c1, c2 2 E c3 3 M C2, c3 • In the above table Course is a multi valued attribute so it is not in 1NF. • Below Table is in 1NF as there is no multi valued attribute • ID Name Course ------------------ 1 A c1 1 A c2 2 E c3 3 M c1 3 M c2
  • 9. Second Normal Form – • To be in second normal form, a relation must be in first normal form and relation must not contain any partial dependency. A relation is in 2NF iff it has No Partial Dependency, i.e., no non-prime attribute (attributes which are not part of any candidate key) is dependent on any proper subset of any candidate key of the table.
  • 11. Second Normal Form example • Partial Dependency – If proper subset of candidate key determines non-prime attribute, it is called partial dependency. • Example 1 – In relation STUDENT_COURSE given in Table 3,FD set: {COURSE_NO->COURSE_NAME} Candidate Key: {STUD_NO, COURSE_NO} In FD COURSE_NO->COURSE_NAME, COURSE_NO (proper subset of candidate key) is determining COURSE_NAME (non-prime attribute). Hence, it is partial dependency and relation is not in second normal form. To convert it to second normal form, we will decompose the relation STUDENT_COURSE (STUD_NO, COURSE_NO, COURSE_NAME) as : • STUDENT_COURSE (STUD_NO, COURSE_NO) COURSE (COURSE_NO, COURSE_NAME) Note – This decomposition will be lossless join decomposition as well as dependency preserving.
  • 12. Third Normal Form • A relation is in third normal form, if there is no transitive dependency for non-prime attributes is it is in second normal form. A relation is in 3NF iff at least one of the following condition holds in every non-trivial function dependency X –> Y 1.X is a super key. 2.Y is a prime attribute (each element of Y is part of some candidate key). •
  • 13. Third Normal Form Example
  • 14. Third Normal Form Example • Transitive dependency – If A->B and B->C are two FDs then A->C is called transitive dependency. – Example 1 – In relation STUDENT given in Table 4,FD set: {STUD_NO -> STUD_NAME, STUD_NO -> STUD_STATE, STUD_STATE -> STUD_COUNTRY, STUD_NO -> STUD_AGE, STUD_STATE -> STUD_COUNTRY} Candidate Key: {STUD_NO} – For this relation in table 4, STUD_NO -> STUD_STATE and STUD_STATE -> STUD_COUNTRY are true. So STUD_COUNTRY is transitively dependent on STUD_NO. It violates third normal form. To convert it in third normal form, we will decompose the relation STUDENT (STUD_NO, STUD_NAME, STUD_PHONE, STUD_STATE, STUD_COUNTRY_STUD_AGE) as: STUDENT (STUD_NO, STUD_NAME, STUD_PHONE, STUD_STATE, STUD_AGE) STATE_COUNTRY (STATE, COUNTRY)
  • 15. Boyce-Code Normal Form (BCNF) – • A relation R is in BCNF if R is in Third Normal Form and for every FD, LHS is super key. • A relation is in BCNF iff in every non-trivial functional dependency X –> Y, X is a super key.
  • 16. Boyce-Code Normal Form (BCNF) Example • Example 1 – Find the highest normal form of a relation R(A,B,C,D,E) with FD set as {BC->D, AC->BE, B->E} Step 1. As we can see, (AC)+ ={A,C,B,E,D} but none of its subset can determine all attribute of relation, So AC will be candidate key. A or C can’t be derived from any other attribute of the relation, so there will be only 1 candidate key {AC}. Step 2. Prime attribute are those attribute which are part of candidate key {A,C} in this example and others will be non-prime {B,D,E} in this example. Step 3. The relation R is in 1st normal form as a relational DBMS does not allow multi-valued or composite attribute.
  • 17. Key Points 1.BCNF is free from redundancy. 2If a relation is in BCNF, then 3NF is also also satisfied. 3. If all attributes of relation are prime attribute, then the relation is always in 3NF. 4.A relation in a Relational Database is always and at least in 1NF form. 5.Every Binary Relation ( a Relation with only 2 attributes ) is always in BCNF.