SlideShare a Scribd company logo
1 of 4
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.
ο‚· 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.
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.
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 candidate-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.
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.
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 βˆ’
Boyce-Codd Normal Form
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
Which confirms that both the relations are in BCNF.

More Related Content

What's hot

Formation of partial differential equations by eliminating arbitrary functions
Formation of partial differential equations by eliminating arbitrary functionsFormation of partial differential equations by eliminating arbitrary functions
Formation of partial differential equations by eliminating arbitrary functionsDr. Boddu Muralee Bala Krushna
Β 
Functional Dependency
Functional DependencyFunctional Dependency
Functional DependencyMANASYJAYASURYA
Β 
Decomposition methods in DBMS
Decomposition methods in DBMSDecomposition methods in DBMS
Decomposition methods in DBMSsoniyagoyal3
Β 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management SystemKevin Jadiya
Β 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalizationdaxesh chauhan
Β 
Functional dependency
Functional dependencyFunctional dependency
Functional dependencySakshi Jaiswal
Β 
Normalization
NormalizationNormalization
Normalizationrehanlko007
Β 
Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalizationUniversity of Potsdam
Β 
24042020_normalization 1.pdf
24042020_normalization 1.pdf24042020_normalization 1.pdf
24042020_normalization 1.pdfShivani139202
Β 
Normalization
NormalizationNormalization
Normalizationmeet darji
Β 
Unit05 dbms
Unit05 dbmsUnit05 dbms
Unit05 dbmsarnold 7490
Β 
Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Vidyasagar Mundroy
Β 
Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalizationVisakh V
Β 
Normalization
NormalizationNormalization
NormalizationVishal Patil
Β 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
Β 

What's hot (20)

Functional dependency
Functional dependencyFunctional dependency
Functional dependency
Β 
First order partial differential equations
First order partial differential equationsFirst order partial differential equations
First order partial differential equations
Β 
Formation of partial differential equations by eliminating arbitrary functions
Formation of partial differential equations by eliminating arbitrary functionsFormation of partial differential equations by eliminating arbitrary functions
Formation of partial differential equations by eliminating arbitrary functions
Β 
Functional Dependency
Functional DependencyFunctional Dependency
Functional Dependency
Β 
Decomposition methods in DBMS
Decomposition methods in DBMSDecomposition methods in DBMS
Decomposition methods in DBMS
Β 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management System
Β 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
Β 
Dbms unit-3
Dbms unit-3Dbms unit-3
Dbms unit-3
Β 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
Β 
Normalization
NormalizationNormalization
Normalization
Β 
Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalization
Β 
Normalization
NormalizationNormalization
Normalization
Β 
24042020_normalization 1.pdf
24042020_normalization 1.pdf24042020_normalization 1.pdf
24042020_normalization 1.pdf
Β 
Normalization
NormalizationNormalization
Normalization
Β 
Unit05 dbms
Unit05 dbmsUnit05 dbms
Unit05 dbms
Β 
Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)
Β 
Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalization
Β 
Chapter 4
Chapter 4Chapter 4
Chapter 4
Β 
Normalization
NormalizationNormalization
Normalization
Β 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Β 

Similar to FD, Normalization, BCNF - Understanding Functional Dependency and Database Normalization

Database Normalisation
Database NormalisationDatabase Normalisation
Database NormalisationAmin Omi
Β 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization TechniquesNishant Munjal
Β 
Chapter – 4 Normalization and Relational Algebra.pdf
Chapter – 4 Normalization and Relational Algebra.pdfChapter – 4 Normalization and Relational Algebra.pdf
Chapter – 4 Normalization and Relational Algebra.pdfTamiratDejene1
Β 
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NFALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NFijdms
Β 
chapter 4-Functional Dependency and Normilization.pdf
chapter 4-Functional Dependency and Normilization.pdfchapter 4-Functional Dependency and Normilization.pdf
chapter 4-Functional Dependency and Normilization.pdfMisganawAbeje1
Β 
7. Relational Database Design in DBMS
7. Relational Database Design in DBMS7. Relational Database Design in DBMS
7. Relational Database Design in DBMSkoolkampus
Β 
DBMS & SQL Notes .pdf
DBMS & SQL Notes .pdfDBMS & SQL Notes .pdf
DBMS & SQL Notes .pdfDieHardGamer
Β 
DBMS_Notes (1).pdf
DBMS_Notes (1).pdfDBMS_Notes (1).pdf
DBMS_Notes (1).pdfshriyashpatil7
Β 
DBMS-Normalization.ppt
DBMS-Normalization.pptDBMS-Normalization.ppt
DBMS-Normalization.pptKalpanaThakre2
Β 
UNIT II DBMS.pptx
UNIT II DBMS.pptxUNIT II DBMS.pptx
UNIT II DBMS.pptxNIVETHA37590
Β 
Top schools in india
Top schools in indiaTop schools in india
Top schools in indiaEdhole.com
Β 
MODULE 4 -Normalization_1.ppt
MODULE 4 -Normalization_1.pptMODULE 4 -Normalization_1.ppt
MODULE 4 -Normalization_1.pptBelkinAntony1
Β 
The relational data model part[1]
The relational data model part[1]The relational data model part[1]
The relational data model part[1]Bashir Rezaie
Β 
[Www.pkbulk.blogspot.com]dbms09
[Www.pkbulk.blogspot.com]dbms09[Www.pkbulk.blogspot.com]dbms09
[Www.pkbulk.blogspot.com]dbms09AnusAhmad
Β 

Similar to FD, Normalization, BCNF - Understanding Functional Dependency and Database Normalization (20)

Database Normalisation
Database NormalisationDatabase Normalisation
Database Normalisation
Β 
Normalization
NormalizationNormalization
Normalization
Β 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization Techniques
Β 
Chapter – 4 Normalization and Relational Algebra.pdf
Chapter – 4 Normalization and Relational Algebra.pdfChapter – 4 Normalization and Relational Algebra.pdf
Chapter – 4 Normalization and Relational Algebra.pdf
Β 
Normalization1
Normalization1Normalization1
Normalization1
Β 
Function Dependencies and Normalization
 Function Dependencies and Normalization Function Dependencies and Normalization
Function Dependencies and Normalization
Β 
Normalization
NormalizationNormalization
Normalization
Β 
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NFALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
Β 
chapter 4-Functional Dependency and Normilization.pdf
chapter 4-Functional Dependency and Normilization.pdfchapter 4-Functional Dependency and Normilization.pdf
chapter 4-Functional Dependency and Normilization.pdf
Β 
7. Relational Database Design in DBMS
7. Relational Database Design in DBMS7. Relational Database Design in DBMS
7. Relational Database Design in DBMS
Β 
DBMS & SQL Notes.pdf
DBMS & SQL Notes.pdfDBMS & SQL Notes.pdf
DBMS & SQL Notes.pdf
Β 
DBMS & SQL Notes .pdf
DBMS & SQL Notes .pdfDBMS & SQL Notes .pdf
DBMS & SQL Notes .pdf
Β 
DBMS_Notes (1).pdf
DBMS_Notes (1).pdfDBMS_Notes (1).pdf
DBMS_Notes (1).pdf
Β 
DBMS-Normalization.ppt
DBMS-Normalization.pptDBMS-Normalization.ppt
DBMS-Normalization.ppt
Β 
UNIT II DBMS.pptx
UNIT II DBMS.pptxUNIT II DBMS.pptx
UNIT II DBMS.pptx
Β 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
Β 
MODULE 4 -Normalization_1.ppt
MODULE 4 -Normalization_1.pptMODULE 4 -Normalization_1.ppt
MODULE 4 -Normalization_1.ppt
Β 
The relational data model part[1]
The relational data model part[1]The relational data model part[1]
The relational data model part[1]
Β 
Cs501 fd nf
Cs501 fd nfCs501 fd nf
Cs501 fd nf
Β 
[Www.pkbulk.blogspot.com]dbms09
[Www.pkbulk.blogspot.com]dbms09[Www.pkbulk.blogspot.com]dbms09
[Www.pkbulk.blogspot.com]dbms09
Β 

More from Bathshebaparimala

C programming structures & union
C programming structures & unionC programming structures & union
C programming structures & unionBathshebaparimala
Β 
An enhanced liver stages classification in 3 d ct and 3d-us images using glrl...
An enhanced liver stages classification in 3 d ct and 3d-us images using glrl...An enhanced liver stages classification in 3 d ct and 3d-us images using glrl...
An enhanced liver stages classification in 3 d ct and 3d-us images using glrl...Bathshebaparimala
Β 
Protocols and its standards
Protocols and its standardsProtocols and its standards
Protocols and its standardsBathshebaparimala
Β 
Hint for transmission media
Hint for transmission mediaHint for transmission media
Hint for transmission mediaBathshebaparimala
Β 
Osi model detail description
Osi model  detail descriptionOsi model  detail description
Osi model detail descriptionBathshebaparimala
Β 
Creating a rainbow using graphics programming in c
Creating a rainbow using graphics programming in cCreating a rainbow using graphics programming in c
Creating a rainbow using graphics programming in cBathshebaparimala
Β 
Generation of Computer Network
Generation of Computer NetworkGeneration of Computer Network
Generation of Computer NetworkBathshebaparimala
Β 
Network -Lecture Notes
Network -Lecture NotesNetwork -Lecture Notes
Network -Lecture NotesBathshebaparimala
Β 
Segmentation of Machine learning Algorithm
Segmentation of Machine learning AlgorithmSegmentation of Machine learning Algorithm
Segmentation of Machine learning AlgorithmBathshebaparimala
Β 

More from Bathshebaparimala (20)

C programming structures & union
C programming structures & unionC programming structures & union
C programming structures & union
Β 
An enhanced liver stages classification in 3 d ct and 3d-us images using glrl...
An enhanced liver stages classification in 3 d ct and 3d-us images using glrl...An enhanced liver stages classification in 3 d ct and 3d-us images using glrl...
An enhanced liver stages classification in 3 d ct and 3d-us images using glrl...
Β 
Assessment
AssessmentAssessment
Assessment
Β 
Protocols and its standards
Protocols and its standardsProtocols and its standards
Protocols and its standards
Β 
Unit v
Unit vUnit v
Unit v
Β 
Hint for transmission media
Hint for transmission mediaHint for transmission media
Hint for transmission media
Β 
Osi model detail description
Osi model  detail descriptionOsi model  detail description
Osi model detail description
Β 
Creating a rainbow using graphics programming in c
Creating a rainbow using graphics programming in cCreating a rainbow using graphics programming in c
Creating a rainbow using graphics programming in c
Β 
Network layer
Network layerNetwork layer
Network layer
Β 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
Β 
Assembly language
Assembly languageAssembly language
Assembly language
Β 
Routing
RoutingRouting
Routing
Β 
Transport layer
Transport layerTransport layer
Transport layer
Β 
Generation of Computer Network
Generation of Computer NetworkGeneration of Computer Network
Generation of Computer Network
Β 
Network -Lecture Notes
Network -Lecture NotesNetwork -Lecture Notes
Network -Lecture Notes
Β 
Segmentation of Machine learning Algorithm
Segmentation of Machine learning AlgorithmSegmentation of Machine learning Algorithm
Segmentation of Machine learning Algorithm
Β 
Osireferencemodel
OsireferencemodelOsireferencemodel
Osireferencemodel
Β 
Transmission media
Transmission mediaTransmission media
Transmission media
Β 
Osi model
Osi modelOsi model
Osi model
Β 
Relational dbms
Relational dbmsRelational dbms
Relational dbms
Β 

Recently uploaded

Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”soniya singh
Β 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
Β 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
Β 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
Β 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
Β 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
Β 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
Β 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
Β 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
Β 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
Β 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
Β 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
Β 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
Β 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
Β 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
Β 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
Β 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
Β 

Recently uploaded (20)

Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Model Call Girl in Narela Delhi reach out to us at πŸ”8264348440πŸ”
Β 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
Β 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
Β 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
Β 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
Β 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
Β 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
Β 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Β 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
Β 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
Β 
β˜… CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
β˜… CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCRβ˜… CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
β˜… CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
Β 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
Β 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
Β 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
Β 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
Β 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
Β 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
Β 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Β 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
Β 

FD, Normalization, BCNF - Understanding Functional Dependency and Database Normalization

  • 1. 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. ο‚· 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
  • 2. 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. 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. 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 candidate-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.
  • 3. 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. 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. 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.
  • 4. 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 βˆ’ Boyce-Codd Normal Form 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 Which confirms that both the relations are in BCNF.