SlideShare a Scribd company logo
1 of 22
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

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

normalization ppt.pptx
normalization ppt.pptxnormalization ppt.pptx
normalization ppt.pptxAbdusSadik
 
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.pptAshishPatel366192
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Futureijtsrd
 
Fd & Normalization - Database Management System
Fd & Normalization - Database Management SystemFd & Normalization - Database Management System
Fd & Normalization - Database Management SystemDrishti Bhalla
 
Introduction to database-Normalisation
Introduction to database-NormalisationIntroduction to database-Normalisation
Introduction to database-NormalisationAjit Nayak
 
MODULE 4 -Normalization_1.ppt
MODULE 4 -Normalization_1.pptMODULE 4 -Normalization_1.ppt
MODULE 4 -Normalization_1.pptBelkinAntony1
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization TechniquesNishant Munjal
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignPrabu U
 
Database normalization
Database normalizationDatabase normalization
Database normalizationJignesh Jain
 
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdffunctionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdfAnvesha Joshi
 

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 (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

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

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.