SlideShare a Scribd company logo
Daffodil International University
Welcome To Our Presentation
Name :
Moushumi Zaman Bonny
Designation
Senior Lecturer
Department
Department of Computer Science and
Engineering
Faculty
Faculty of Science and Information Technology
E-mail
bonny.cse@diu.edu.bd
“Edge”
Database Normalization
&
Functional dependency
Database Normalization
 The main goal of Database
Normalization is to restructure the
logical data model of a database to:
 Eliminate redundancy
 Organize data efficiently
 Reduce the potential for data
anomalies.
Brief History/Overview
 Database Normalization was first proposed by Edgar F. Codd.
 Codd defined the first three Normal Forms, which we’ll look into, of
the 7 known Normal Forms.
 In order to do normalization we must know what the requirements
are for each of the three Normal Forms that we’ll go over.
 One of the key requirements to remember is that Normal Forms are
progressive. That is, in order to have 3rd NF we must have 2nd NF
and in order to have 2nd NF we must have 1st NF.
Normal Form
 Initially Codd (1972) presented three normal
forms (1NF, 2NF and 3NF) all based on
functional dependencies among the attributes
of a relation. Later Boyce and Codd proposed
another normal form called the Boyce-Codd
normal form (BCNF). The fourth and fifth
normal forms are based on multi-value and
join dependencies and were proposed later.
 The primary objective of normalization is to
avoid anomalies.
1st Normal Form
The Requirements
 The requirements to satisfy the 1st NF:
 Each table has a primary key: minimal set of
attributes which can uniquely identify a
record
 The values in each column of a table are
atomic (No multi-value attributes allowed).
 There are no repeating groups: two columns
do not store similar information in the same
table.
1st Normal Form
Example
Un-normalized Students table:
Normalized Students table:
Student# AdvID AdvName AdvRoom Class1 Class2
123 123A James 555 102-8 104-9
124 123B Smith 467 209-0 102-8
Student# AdvID AdvName AdvRoom Class#
123 123A James 555 102-8
123 123A James 555 104-9
124 123B Smith 467 209-0
124 123B Smith 467 102-8
Definition
A functional dependency is defined as a
constraint between two sets of attributes
in a relation from a database.
Given a relation R, a set of attributes X in R
is said to functionally determine another
attribute Y, also in R, (written X → Y) if
and only if each X value is associated
with at most one Y value.
Example
Employee
SSN Name JobType DeptName
557-78-6587 Lance Smith Accountant Salary
214-45-2398 Lance Smith Engineer Product
Note: Name is functionally dependent on SSN because an employee’s name
can be uniquely determined from their SSN. Name does not determine SSN,
because more than one employee can have the same name..
FULL AND PARTIAL FUNCTIONAL DEPENDENCY
• Grade is fully functionally dependent on the primary key (ID,
Course-ID) because both parts of the primary keys are needed to
determine Grade.
• On the other hand both Name and Phone attributes
are partially dependent on the primary key, because only a part
of the primary key namely ID is needed to determine them and
similarly Credit-Hours and Course-Name can be determined
using Course-ID .
ID Name Phone Course
ID
Course Name Credit
-Hours
Grad
e
• Closure of a set F of FDs is the set of all FDs logically implied by
F.
Example : Suppose we are given a relation scheme R=(A,B,C,G,H,I)
and the set of FDs as :
F={AB,CGH,CGI,BH }
Therefore, F + ={AH (By Transitivity), CGHI(By
Additivity or Union)}
INFERENCE RULES OF FDs
2nd Normal Form
The Requirements
 The requirements to satisfy the 2nd NF:
 All requirements for 1st NF must be met.
 Redundant data across multiple rows of
a table must be moved to a separate
table.
○ The resulting tables must be related to each
other by use of foreign key.
2nd Normal Form
ExampleStudents table
Registration table
Student AdvID AdvName AdvRoom
123 123A James 555
124 123B Smith 467
Student Class
123 102-8
123 104-9
124 209-0
124 102-8
3rd Normal Form
The Requirements
 The requirements to satisfy the 3rd NF:
 All requirements for 2nd NF must be met.
 Eliminate fields that do not depend on
the primary key;
○ That is, any field that is dependent not only on
the primary key but also on another field must
be moved to another table.
3rd Normal Form
Example
Students table:
Student table: Advisor table:
Student# AdvID AdvName AdvRoom
123 123A James 555
124 123B Smith 467
Student# AdvID
123 123A
124 123B
AdvID AdvName AdvRoom
123A James 555
123B Smith 467
3rd Normal Form
Example Cont.Students table:
Registration table: Advisor table:
Student# Class#
123 102-8
123 104-9
124 209-0
124 102-8
AdvID AdvName AdvRoom
123A James 555
123B Smith 467
Student# AdvID
123 123A
124 123B
Conclusion
 We have seen how Database
Normalization can decrease redundancy,
increase efficiency and reduce anomalies
by implementing three of seven different
levels of normalization called Normal
Forms. The first three NF’s are usually
sufficient for most small to medium size
applications.
normalization

More Related Content

What's hot

Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
daxesh chauhan
 
Chuẩn hóa CSDL
Chuẩn hóa CSDLChuẩn hóa CSDL
Chuẩn hóa CSDL
phananhvu
 
Normalization
NormalizationNormalization
Normalization
lingesan
 

What's hot (20)

Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
 
Chuẩn hóa CSDL
Chuẩn hóa CSDLChuẩn hóa CSDL
Chuẩn hóa CSDL
 
B+ tree
B+ treeB+ tree
B+ tree
 
Typedef
TypedefTypedef
Typedef
 
Types of normalization
Types of normalizationTypes of normalization
Types of normalization
 
Advanced Normalization
Advanced NormalizationAdvanced Normalization
Advanced Normalization
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATION
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
SQL For PHP Programmers
SQL For PHP ProgrammersSQL For PHP Programmers
SQL For PHP Programmers
 
C programing -Structure
C programing -StructureC programing -Structure
C programing -Structure
 
Dbms normalization
Dbms normalizationDbms normalization
Dbms normalization
 
Binary Tree Traversal
Binary Tree TraversalBinary Tree Traversal
Binary Tree Traversal
 
Redundancy analysis on linked data #cold2014 #ISWC2014
Redundancy analysis on linked data #cold2014 #ISWC2014Redundancy analysis on linked data #cold2014 #ISWC2014
Redundancy analysis on linked data #cold2014 #ISWC2014
 
Structure in c
Structure in cStructure in c
Structure in c
 
Structure in C language
Structure in C languageStructure in C language
Structure in C language
 
Normalization in SQL | Edureka
Normalization in SQL | EdurekaNormalization in SQL | Edureka
Normalization in SQL | Edureka
 
Assignment#11
Assignment#11Assignment#11
Assignment#11
 
Basic cross section and exploratory data analysis
Basic cross section and exploratory data analysis Basic cross section and exploratory data analysis
Basic cross section and exploratory data analysis
 
Structure in c
Structure in cStructure in c
Structure in c
 
Normalization
NormalizationNormalization
Normalization
 

Similar to normalization

Database normalization
Database normalizationDatabase normalization
Database normalization
Jignesh Jain
 

Similar to normalization (20)

normalization ppt.pptx
normalization ppt.pptxnormalization ppt.pptx
normalization ppt.pptx
 
normalization-1nf-to-3nf-with-same-example.ppt
normalization-1nf-to-3nf-with-same-example.pptnormalization-1nf-to-3nf-with-same-example.ppt
normalization-1nf-to-3nf-with-same-example.ppt
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
 
Normalization
NormalizationNormalization
Normalization
 
Fd & Normalization - Database Management System
Fd & Normalization - Database Management SystemFd & Normalization - Database Management System
Fd & Normalization - Database Management System
 
Introduction to database-Normalisation
Introduction to database-NormalisationIntroduction to database-Normalisation
Introduction to database-Normalisation
 
09.01 normalization
09.01 normalization09.01 normalization
09.01 normalization
 
MODULE 4 -Normalization_1.ppt
MODULE 4 -Normalization_1.pptMODULE 4 -Normalization_1.ppt
MODULE 4 -Normalization_1.ppt
 
UNIT 2 -PPT.pptx
UNIT 2 -PPT.pptxUNIT 2 -PPT.pptx
UNIT 2 -PPT.pptx
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization Techniques
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Dbms
DbmsDbms
Dbms
 
Research gadot
Research gadotResearch gadot
Research gadot
 
Dbms ppt
Dbms pptDbms ppt
Dbms ppt
 
Normalization
NormalizationNormalization
Normalization
 
Unit05 dbms
Unit05 dbmsUnit05 dbms
Unit05 dbms
 
Final exam in advance dbms
Final exam in advance dbmsFinal exam in advance dbms
Final exam in advance dbms
 
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdffunctionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
 
L8 design1
L8 design1L8 design1
L8 design1
 

More from Daffodil International University

Ahsan Manzil
Ahsan Manzil Ahsan Manzil

More from Daffodil International University (20)

Bresenham algorithm
Bresenham algorithmBresenham algorithm
Bresenham algorithm
 
Tic Tac Toe
Tic Tac ToeTic Tac Toe
Tic Tac Toe
 
The Waterfall Model & RAD MODEL
 The Waterfall Model &  RAD MODEL The Waterfall Model &  RAD MODEL
The Waterfall Model & RAD MODEL
 
Reinforcement learning
Reinforcement learningReinforcement learning
Reinforcement learning
 
online marketing
online marketingonline marketing
online marketing
 
Bioinformatics lesson
Bioinformatics lessonBioinformatics lesson
Bioinformatics lesson
 
Blasta
BlastaBlasta
Blasta
 
Bioinformatics lesson
Bioinformatics lessonBioinformatics lesson
Bioinformatics lesson
 
Liver
LiverLiver
Liver
 
Numerical methods
Numerical methodsNumerical methods
Numerical methods
 
stack in assembally language
stack in assembally languagestack in assembally language
stack in assembally language
 
OSI Model
OSI ModelOSI Model
OSI Model
 
Topology
TopologyTopology
Topology
 
Complex number
Complex numberComplex number
Complex number
 
Ahsan Manzil
Ahsan Manzil Ahsan Manzil
Ahsan Manzil
 
Big data
Big dataBig data
Big data
 
Search
SearchSearch
Search
 
Encoders
EncodersEncoders
Encoders
 
Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methods
 
Finite difference & interpolation
Finite difference & interpolationFinite difference & interpolation
Finite difference & interpolation
 

Recently uploaded

Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
Avinash Rai
 

Recently uploaded (20)

Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Forest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFForest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDF
 

normalization

  • 2. Name : Moushumi Zaman Bonny Designation Senior Lecturer Department Department of Computer Science and Engineering Faculty Faculty of Science and Information Technology E-mail bonny.cse@diu.edu.bd
  • 5. Database Normalization  The main goal of Database Normalization is to restructure the logical data model of a database to:  Eliminate redundancy  Organize data efficiently  Reduce the potential for data anomalies.
  • 6. Brief History/Overview  Database Normalization was first proposed by Edgar F. Codd.  Codd defined the first three Normal Forms, which we’ll look into, of the 7 known Normal Forms.  In order to do normalization we must know what the requirements are for each of the three Normal Forms that we’ll go over.  One of the key requirements to remember is that Normal Forms are progressive. That is, in order to have 3rd NF we must have 2nd NF and in order to have 2nd NF we must have 1st NF.
  • 7. Normal Form  Initially Codd (1972) presented three normal forms (1NF, 2NF and 3NF) all based on functional dependencies among the attributes of a relation. Later Boyce and Codd proposed another normal form called the Boyce-Codd normal form (BCNF). The fourth and fifth normal forms are based on multi-value and join dependencies and were proposed later.  The primary objective of normalization is to avoid anomalies.
  • 8. 1st Normal Form The Requirements  The requirements to satisfy the 1st NF:  Each table has a primary key: minimal set of attributes which can uniquely identify a record  The values in each column of a table are atomic (No multi-value attributes allowed).  There are no repeating groups: two columns do not store similar information in the same table.
  • 9. 1st Normal Form Example Un-normalized Students table: Normalized Students table: Student# AdvID AdvName AdvRoom Class1 Class2 123 123A James 555 102-8 104-9 124 123B Smith 467 209-0 102-8 Student# AdvID AdvName AdvRoom Class# 123 123A James 555 102-8 123 123A James 555 104-9 124 123B Smith 467 209-0 124 123B Smith 467 102-8
  • 10. Definition A functional dependency is defined as a constraint between two sets of attributes in a relation from a database. Given a relation R, a set of attributes X in R is said to functionally determine another attribute Y, also in R, (written X → Y) if and only if each X value is associated with at most one Y value.
  • 11.
  • 12. Example Employee SSN Name JobType DeptName 557-78-6587 Lance Smith Accountant Salary 214-45-2398 Lance Smith Engineer Product Note: Name is functionally dependent on SSN because an employee’s name can be uniquely determined from their SSN. Name does not determine SSN, because more than one employee can have the same name..
  • 13. FULL AND PARTIAL FUNCTIONAL DEPENDENCY • Grade is fully functionally dependent on the primary key (ID, Course-ID) because both parts of the primary keys are needed to determine Grade. • On the other hand both Name and Phone attributes are partially dependent on the primary key, because only a part of the primary key namely ID is needed to determine them and similarly Credit-Hours and Course-Name can be determined using Course-ID . ID Name Phone Course ID Course Name Credit -Hours Grad e
  • 14. • Closure of a set F of FDs is the set of all FDs logically implied by F. Example : Suppose we are given a relation scheme R=(A,B,C,G,H,I) and the set of FDs as : F={AB,CGH,CGI,BH } Therefore, F + ={AH (By Transitivity), CGHI(By Additivity or Union)} INFERENCE RULES OF FDs
  • 15. 2nd Normal Form The Requirements  The requirements to satisfy the 2nd NF:  All requirements for 1st NF must be met.  Redundant data across multiple rows of a table must be moved to a separate table. ○ The resulting tables must be related to each other by use of foreign key.
  • 16.
  • 17. 2nd Normal Form ExampleStudents table Registration table Student AdvID AdvName AdvRoom 123 123A James 555 124 123B Smith 467 Student Class 123 102-8 123 104-9 124 209-0 124 102-8
  • 18. 3rd Normal Form The Requirements  The requirements to satisfy the 3rd NF:  All requirements for 2nd NF must be met.  Eliminate fields that do not depend on the primary key; ○ That is, any field that is dependent not only on the primary key but also on another field must be moved to another table.
  • 19. 3rd Normal Form Example Students table: Student table: Advisor table: Student# AdvID AdvName AdvRoom 123 123A James 555 124 123B Smith 467 Student# AdvID 123 123A 124 123B AdvID AdvName AdvRoom 123A James 555 123B Smith 467
  • 20. 3rd Normal Form Example Cont.Students table: Registration table: Advisor table: Student# Class# 123 102-8 123 104-9 124 209-0 124 102-8 AdvID AdvName AdvRoom 123A James 555 123B Smith 467 Student# AdvID 123 123A 124 123B
  • 21. Conclusion  We have seen how Database Normalization can decrease redundancy, increase efficiency and reduce anomalies by implementing three of seven different levels of normalization called Normal Forms. The first three NF’s are usually sufficient for most small to medium size applications.