SlideShare a Scribd company logo
2
Most read
Normalization in Database
Functional Dependency, DBMS Normalization,
Normalization Rules
By Roshni Singh
1/1/2017
Database Normalization
Database Normalization
Functional Dependency
Functional dependency (FD) is a set of constraints between two attributes in
a relation. Functional dependency says that if two tuples have same values
for attributes A1, A2,..., An, then those two tuples must have to have same
values for attributes B1, B2, ..., Bn.
Functional dependency is represented by an arrow sign (→) that is, X→Y,
where X functionally determines Y. The left-hand side attributes determine
the values of attributes on the right-hand side.
Armstrong's Axioms
If F is a set of functional dependencies then the closure of F, denoted as F+
,
is the set of all functional dependencies logically implied by F. Armstrong's
Axioms are a set of rules, that when applied repeatedly, generates a closure
of functional dependencies.
 Reflexive rule − If alpha is a set of attributes and beta is_subset_of alpha,
then alpha holds beta.
 Augmentation rule − If a → b holds and y is attribute set, then ay → by also
holds. That is adding attributes in dependencies, does not change the basic
dependencies.
 Transitivity rule − Same as transitive rule in algebra, if a → b holds and b → c
holds, then a → c also holds. a → b is called as a functionally that determines b.
Trivial Functional Dependency
 Trivial − If a functional dependency (FD) X → Y holds, where Y is a subset of X,
then it is called a trivial FD. Trivial FDs always hold.
 Non-trivial − If an FD X → Y holds, where Y is not a subset of X, then it is
called a non-trivial FD.
Database Normalization
 Completely non-trivial − If an FD X → Y holds, where x intersect Y = Φ, it is
said to be a completely non-trivial FD.
Normalization
If a database design is not perfect, it may contain anomalies, which are like
a bad dream for any database administrator. Managing a database with
anomalies is next to impossible.
 Update anomalies − If data items are scattered and are not linked to each
other properly, then it could lead to strange situations. For example, when we
try to update one data item having its copies scattered over several places, a
few instances get updated properly while a few others are left with old values.
Such instances leave the database in an inconsistent state.
 Deletion anomalies − We tried to delete a record, but parts of it was left
undeleted because of unawareness, the data is also saved somewhere else.
 Insert anomalies − We tried to insert data in a record that does not exist at
all.
Normalization is a method to remove all these anomalies and bring the
database to a consistent state.
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
First Normal Form is defined in the definition of relations (tables) itself. This
rule defines that all the attributes in a relation must have atomic domains.
The values in an atomic domain are indivisible units.
Database Normalization
We re-arrange the relation (table) as below, to convert it to First Normal
Form.
Each attribute must contain only a single value from its pre-defined domain.
Second Normal Form
Before we learn about the second normal form, we need to understand the
following −
 Prime attribute − An attribute, which is a part of the prime-key, is known as a
prime attribute.
 Non-prime attribute − An attribute, which is not a part of the prime-key, is
said to be a non-prime attribute.
If we follow second normal form, then every non-prime attribute should be
fully functionally dependent on prime key attribute. That is, if X → A holds,
then there should not be any proper subset Y of X, for which Y → A also
holds true.
Database Normalization
We see here in Student_Project relation that the prime key attributes are
Stu_ID and Proj_ID. According to the rule, non-key attributes, i.e.
Stu_Name and Proj_Name must be dependent upon both and not on any of
the prime key attribute individually. But we find that Stu_Name can be
identified by Stu_ID and Proj_Name can be identified by Proj_ID
independently. This is called partial dependency, which is not allowed in
Second Normal Form.
We broke the relation in two as depicted in the above picture. So there
exists no partial dependency.
Database Normalization
Third Normal Form
For a relation to be in Third Normal Form, it must be in Second Normal form
and the following must satisfy −
 No non-prime attribute is transitively dependent on prime key
attribute.
 For any non-trivial functional dependency, X → A, then either −
o X is a superkey or
o A is prime attribute.
We find that in the above Student_detail relation, Stu_ID is the key and
only prime key attribute. We find that City can be identified by Stu_ID as
well as Zip itself. Neither Zip is a superkey nor is City a prime attribute.
Additionally, Stu_ID → Zip → City, so there exists transitive dependency.
To bring this relation into third normal form, we break the relation into two
relations as follows −
Database Normalization
Boyce-Codd Normal Form (BCNF)
Boyce-Codd Normal Form (BCNF) is an extension of Third Normal Form on
strict terms. BCNF states that −
 For any non-trivial functional dependency, X → A, X must be a super-
key.
In the above image, Stu_ID is the super-key in the relation Student_Detail
and Zip is the super-key in the relation ZipCodes. So,
Stu_ID → Stu_Name, Zip and Zip → City
This confirms that both the relations are in BCNF.

More Related Content

PPTX
database language ppt.pptx
PPT
Basic DBMS ppt
PDF
Database Normalization
PPTX
Distributed database management system
PPTX
DATABASE CONSTRAINTS
PPTX
Normalization in RDBMS
PPTX
2 phase locking protocol DBMS
PPTX
Functional dependancy
database language ppt.pptx
Basic DBMS ppt
Database Normalization
Distributed database management system
DATABASE CONSTRAINTS
Normalization in RDBMS
2 phase locking protocol DBMS
Functional dependancy

What's hot (20)

PPTX
Characteristic of dabase approach
PPTX
Database constraints
PPTX
Integrity Constraints
PPTX
Introduction to database
PDF
Lecture 8 Library classes
PPTX
Normalization
PPTX
Introduction to database & sql
PPT
Data models
PPTX
SQL Queries Information
PPT
Data Warehousing and Data Mining
PPT
Normalisation - 2nd normal form
PPTX
Database abstraction
PPTX
Integrity Constraints
PDF
Relational Algebra & Calculus
PPT
1. Introduction to DBMS
PPTX
Concurrency control
PPTX
File organization
PPTX
Architecture of dbms(lecture 3)
PPT
Data independence
PDF
4 the relational data model and relational database constraints
Characteristic of dabase approach
Database constraints
Integrity Constraints
Introduction to database
Lecture 8 Library classes
Normalization
Introduction to database & sql
Data models
SQL Queries Information
Data Warehousing and Data Mining
Normalisation - 2nd normal form
Database abstraction
Integrity Constraints
Relational Algebra & Calculus
1. Introduction to DBMS
Concurrency control
File organization
Architecture of dbms(lecture 3)
Data independence
4 the relational data model and relational database constraints
Ad

Viewers also liked (20)

PPTX
Functional dependencies and normalization
PPTX
Functional dependencies and normalization for relational databases
PPTX
Normalization in DBMS
PDF
Database design & Normalization (1NF, 2NF, 3NF)
PPT
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
PPTX
Functional dependency
PPTX
Shashi DATABASE FUNCTIONAL DEPENDENCY QUESTION
PPTX
Dbms normalization
PPT
DBMS - Normalization
PPT
Databases: Normalisation
PPTX
Database Dependency with NetVisn
PPTX
DBMS Lecture 8 - Normalization
PPT
Normalization
PPTX
1 fn dependency
PPT
Multivalued dependency
PPTX
Normalization in a Database
ZIP
Algorithm Introduction #18 B-Tree
PPTX
An Introduction To Software Development - Architecture & Detailed Design
PPTX
Theory of dependencies in relational database
PPTX
Ism normalization pine valley 2012
Functional dependencies and normalization
Functional dependencies and normalization for relational databases
Normalization in DBMS
Database design & Normalization (1NF, 2NF, 3NF)
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Functional dependency
Shashi DATABASE FUNCTIONAL DEPENDENCY QUESTION
Dbms normalization
DBMS - Normalization
Databases: Normalisation
Database Dependency with NetVisn
DBMS Lecture 8 - Normalization
Normalization
1 fn dependency
Multivalued dependency
Normalization in a Database
Algorithm Introduction #18 B-Tree
An Introduction To Software Development - Architecture & Detailed Design
Theory of dependencies in relational database
Ism normalization pine valley 2012
Ad

Similar to Normalization in Database (20)

PDF
Database normalization
DOCX
Normalization
PPTX
Database Normalisation
PPTX
DBMS_UNIT_IV.pptxbdndjdkdjdndjkdkdkdkdkdkdk
PPTX
functional dependency in engineering.pptx
PDF
Chapter – 4 Normalization and Relational Algebra.pdf
PDF
24042020_normalization 1.pdf
PPTX
functional dependency in database (1).pptx
PPTX
Normalization
PDF
UNIT 4 NORMALIZATION AND QUERY OPTIMIZATION 9.pdf
PPT
Chapter six - Normalization.ppt fundamental of db
PPTX
Database Design and Normalization Techniques
PPTX
Learn more about database normalization concepts
PDF
Database Systems - Normalization of Relations(Chapter 4/3)
PDF
chapter 4-Functional Dependency and Normilization.pdf
PPT
Function Dependencies and Normalization
PPT
Cross-reference or relationship relation optionAdditional01.ppt
PDF
Dbms unit-3
PPTX
Fd & Normalization - Database Management System
Database normalization
Normalization
Database Normalisation
DBMS_UNIT_IV.pptxbdndjdkdjdndjkdkdkdkdkdkdk
functional dependency in engineering.pptx
Chapter – 4 Normalization and Relational Algebra.pdf
24042020_normalization 1.pdf
functional dependency in database (1).pptx
Normalization
UNIT 4 NORMALIZATION AND QUERY OPTIMIZATION 9.pdf
Chapter six - Normalization.ppt fundamental of db
Database Design and Normalization Techniques
Learn more about database normalization concepts
Database Systems - Normalization of Relations(Chapter 4/3)
chapter 4-Functional Dependency and Normilization.pdf
Function Dependencies and Normalization
Cross-reference or relationship relation optionAdditional01.ppt
Dbms unit-3
Fd & Normalization - Database Management System

Recently uploaded (20)

PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Internet of Things (IOT) - A guide to understanding
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
web development for engineering and engineering
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
composite construction of structures.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPT
Mechanical Engineering MATERIALS Selection
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Geodesy 1.pptx...............................................
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Internet of Things (IOT) - A guide to understanding
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
web development for engineering and engineering
Model Code of Practice - Construction Work - 21102022 .pdf
composite construction of structures.pdf
Foundation to blockchain - A guide to Blockchain Tech
Mechanical Engineering MATERIALS Selection
OOP with Java - Java Introduction (Basics)
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
UNIT 4 Total Quality Management .pptx
Geodesy 1.pptx...............................................
Operating System & Kernel Study Guide-1 - converted.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

Normalization in Database

  • 1. Normalization in Database Functional Dependency, DBMS Normalization, Normalization Rules By Roshni Singh 1/1/2017
  • 2. Database Normalization Database Normalization Functional Dependency Functional dependency (FD) is a set of constraints between two attributes in a relation. Functional dependency says that if two tuples have same values for attributes A1, A2,..., An, then those two tuples must have to have same values for attributes B1, B2, ..., Bn. Functional dependency is represented by an arrow sign (→) that is, X→Y, where X functionally determines Y. The left-hand side attributes determine the values of attributes on the right-hand side. Armstrong's Axioms If F is a set of functional dependencies then the closure of F, denoted as F+ , is the set of all functional dependencies logically implied by F. Armstrong's Axioms are a set of rules, that when applied repeatedly, generates a closure of functional dependencies.  Reflexive rule − If alpha is a set of attributes and beta is_subset_of alpha, then alpha holds beta.  Augmentation rule − If a → b holds and y is attribute set, then ay → by also holds. That is adding attributes in dependencies, does not change the basic dependencies.  Transitivity rule − Same as transitive rule in algebra, if a → b holds and b → c holds, then a → c also holds. a → b is called as a functionally that determines b. Trivial Functional Dependency  Trivial − If a functional dependency (FD) X → Y holds, where Y is a subset of X, then it is called a trivial FD. Trivial FDs always hold.  Non-trivial − If an FD X → Y holds, where Y is not a subset of X, then it is called a non-trivial FD.
  • 3. Database Normalization  Completely non-trivial − If an FD X → Y holds, where x intersect Y = Φ, it is said to be a completely non-trivial FD. Normalization If a database design is not perfect, it may contain anomalies, which are like a bad dream for any database administrator. Managing a database with anomalies is next to impossible.  Update anomalies − If data items are scattered and are not linked to each other properly, then it could lead to strange situations. For example, when we try to update one data item having its copies scattered over several places, a few instances get updated properly while a few others are left with old values. Such instances leave the database in an inconsistent state.  Deletion anomalies − We tried to delete a record, but parts of it was left undeleted because of unawareness, the data is also saved somewhere else.  Insert anomalies − We tried to insert data in a record that does not exist at all. Normalization is a method to remove all these anomalies and bring the database to a consistent state. 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 First Normal Form is defined in the definition of relations (tables) itself. This rule defines that all the attributes in a relation must have atomic domains. The values in an atomic domain are indivisible units.
  • 4. Database Normalization We re-arrange the relation (table) as below, to convert it to First Normal Form. Each attribute must contain only a single value from its pre-defined domain. Second Normal Form Before we learn about the second normal form, we need to understand the following −  Prime attribute − An attribute, which is a part of the prime-key, is known as a prime attribute.  Non-prime attribute − An attribute, which is not a part of the prime-key, is said to be a non-prime attribute. If we follow second normal form, then every non-prime attribute should be fully functionally dependent on prime key attribute. That is, if X → A holds, then there should not be any proper subset Y of X, for which Y → A also holds true.
  • 5. Database Normalization We see here in Student_Project relation that the prime key attributes are Stu_ID and Proj_ID. According to the rule, non-key attributes, i.e. Stu_Name and Proj_Name must be dependent upon both and not on any of the prime key attribute individually. But we find that Stu_Name can be identified by Stu_ID and Proj_Name can be identified by Proj_ID independently. This is called partial dependency, which is not allowed in Second Normal Form. We broke the relation in two as depicted in the above picture. So there exists no partial dependency.
  • 6. Database Normalization Third Normal Form For a relation to be in Third Normal Form, it must be in Second Normal form and the following must satisfy −  No non-prime attribute is transitively dependent on prime key attribute.  For any non-trivial functional dependency, X → A, then either − o X is a superkey or o A is prime attribute. We find that in the above Student_detail relation, Stu_ID is the key and only prime key attribute. We find that City can be identified by Stu_ID as well as Zip itself. Neither Zip is a superkey nor is City a prime attribute. Additionally, Stu_ID → Zip → City, so there exists transitive dependency. To bring this relation into third normal form, we break the relation into two relations as follows −
  • 7. Database Normalization Boyce-Codd Normal Form (BCNF) Boyce-Codd Normal Form (BCNF) is an extension of Third Normal Form on strict terms. BCNF states that −  For any non-trivial functional dependency, X → A, X must be a super- key. In the above image, Stu_ID is the super-key in the relation Student_Detail and Zip is the super-key in the relation ZipCodes. So, Stu_ID → Stu_Name, Zip and Zip → City This confirms that both the relations are in BCNF.