SlideShare a Scribd company logo
1 of 10
FUNCTIONAL
DEPENDENCY
MANASY JAYASURYA
Dept. of Computer Science & Applications
St.Mary’s College, Thrissur
CONTENTS
Definition
Functional Dependency Example
Keys
Closure
Axioms
Example
2
Definition
 A functional dependency is defined as a constraint
between two sets of attributes in a relation from a
database.
Explanation
 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.
 Here X is the determinant set and Y is the dependent
attribute.
Trivial Dependencies
 Functional Dependency is trivial if and only if right
side is the subset of left side.
3
Example
Employee
SSNSSN NameName JobTypeJobType DeptNameDeptName
557-78-6587557-78-6587 Lance SmithLance Smith AccountantAccountant SalarySalary
214-45-2398214-45-2398 Lance SmithLance Smith EngineerEngineer ProductProduct
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..
4
Keys
Key is a set of attributes that uniquely
identifies an entire tuple.
Functional dependency allows to express
constraints that uniquely identify the values of
certain attributes.
However, a candidate key is always a
determinant, but a determinant doesn’t need to
be a key.
5
Closure
 Let a relation R have some functional
dependencies F specified. The closure of F
(usually written as F+) is the set of all functional
dependencies that may be logically derived from
F. Often F is the set of most obvious and important
functional dependencies and F+, the closure, is the
set of all the functional dependencies including F
and those that can be deduced from F.
 The closure is important and may, needed in
finding one or more candidate keys of the relation.
6
Axioms for finding Closure of a relation
1. Reflexivity Rule --- If X is a set of attributes and Y is a subset of X, then X
→ Y holds.
2. Augmentation Rule --- If X → Y holds and W is a set of attributes, then
WX → WY holds.
3. Transitivity Rule --- If X → Y and Y → Z holds, then X → Z holds.
Derived Theorems from Axioms
4. Union Rule --- If X → Y and X → Z holds, then X → YZ holds.
5. Decomposition Rule --- If X → YZ holds, then so do X → Y and X → Z.
6. Pseudotransitivity Rule --- If X → Y and WY → Z hold then so does WX
→ Z.
7. Self-determination--- A → A
8. Composition --- If A → B and C → D then AC → BD
9. General Unification Theorem ---
If A → B and C → D , then A U (C-B) → BD 7
Example
Student
SNoSNo SNameSName CNoCNo CNameCName AddrAddr Instr.Instr. OfficeOffice
54255425 SusanSusan
RossRoss
102102 Calc ICalc I ……SanSan
Jose,Jose,
CACA
P.P.
SmithSmith
B42B42
RoomRoom
112112
78457845 DaveDave
TurcoTurco
541541 Bio 10Bio 10 ......SanSan
Diego,Diego,
CACA
L.L.
TalipTalip
B24B24
RoomRoom
210210
SNo -> SName CNo -> CName Instr -> Office
SNo -> Addr CNo -> Instr
8
Back to the Example
SNoSNo SNameSName CNoCNo CNameCName AddrAddr Instr.Instr. OfficeOffice
Based on the rules provided, the following dependencies can be
derived.
(SNo, CNo) →→ SNo (Rule 1) -- subset
(SNo, CNo) →→ CNo (Rule 1)
(SNo, CNo) →→ (SName, CName) (Rule 2) -- augmentation
CNo →→ office (Rule 3) -- transitivity
SNo →→ (SName, address) (Union Rule)
etc.
9
THANK YOU
10

More Related Content

What's hot

Fd & Normalization - Database Management System
Fd & Normalization - Database Management SystemFd & Normalization - Database Management System
Fd & Normalization - Database Management SystemDrishti Bhalla
 
Functional Dependency
Functional DependencyFunctional Dependency
Functional DependencyAlaanoor94
 
Multivalued dependency
Multivalued dependencyMultivalued dependency
Multivalued dependencyavniS
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFOum Saokosal
 
The Database Environment Chapter 4
The Database Environment Chapter 4The Database Environment Chapter 4
The Database Environment Chapter 4Jeanie Arnoco
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mappingShubham Saini
 
DBMS - FIRST NORMAL FORM
DBMS - FIRST NORMAL FORMDBMS - FIRST NORMAL FORM
DBMS - FIRST NORMAL FORMMANISH T I
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignPrabu U
 
Slide 6 er strong & weak entity
Slide 6 er  strong & weak entitySlide 6 er  strong & weak entity
Slide 6 er strong & weak entityVisakh V
 
Relational Algebra and Calculus.ppt
Relational Algebra and Calculus.pptRelational Algebra and Calculus.ppt
Relational Algebra and Calculus.pptAnkush138
 

What's hot (20)

Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
Normalisation
NormalisationNormalisation
Normalisation
 
Fd & Normalization - Database Management System
Fd & Normalization - Database Management SystemFd & Normalization - Database Management System
Fd & Normalization - Database Management System
 
Functional Dependency
Functional DependencyFunctional Dependency
Functional Dependency
 
Multivalued dependency
Multivalued dependencyMultivalued dependency
Multivalued dependency
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
The Database Environment Chapter 4
The Database Environment Chapter 4The Database Environment Chapter 4
The Database Environment Chapter 4
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Dbms normalization
Dbms normalizationDbms normalization
Dbms normalization
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
 
DBMS - FIRST NORMAL FORM
DBMS - FIRST NORMAL FORMDBMS - FIRST NORMAL FORM
DBMS - FIRST NORMAL FORM
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Normalization
NormalizationNormalization
Normalization
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
 
Normalization
NormalizationNormalization
Normalization
 
Slide 6 er strong & weak entity
Slide 6 er  strong & weak entitySlide 6 er  strong & weak entity
Slide 6 er strong & weak entity
 
Relational Algebra and Calculus.ppt
Relational Algebra and Calculus.pptRelational Algebra and Calculus.ppt
Relational Algebra and Calculus.ppt
 
Data reduction
Data reductionData reduction
Data reduction
 

Recently uploaded

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
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
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
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
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........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
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
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
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
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 ...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Functional Dependency

  • 1. FUNCTIONAL DEPENDENCY MANASY JAYASURYA Dept. of Computer Science & Applications St.Mary’s College, Thrissur
  • 3. Definition  A functional dependency is defined as a constraint between two sets of attributes in a relation from a database. Explanation  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.  Here X is the determinant set and Y is the dependent attribute. Trivial Dependencies  Functional Dependency is trivial if and only if right side is the subset of left side. 3
  • 4. Example Employee SSNSSN NameName JobTypeJobType DeptNameDeptName 557-78-6587557-78-6587 Lance SmithLance Smith AccountantAccountant SalarySalary 214-45-2398214-45-2398 Lance SmithLance Smith EngineerEngineer ProductProduct 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.. 4
  • 5. Keys Key is a set of attributes that uniquely identifies an entire tuple. Functional dependency allows to express constraints that uniquely identify the values of certain attributes. However, a candidate key is always a determinant, but a determinant doesn’t need to be a key. 5
  • 6. Closure  Let a relation R have some functional dependencies F specified. The closure of F (usually written as F+) is the set of all functional dependencies that may be logically derived from F. Often F is the set of most obvious and important functional dependencies and F+, the closure, is the set of all the functional dependencies including F and those that can be deduced from F.  The closure is important and may, needed in finding one or more candidate keys of the relation. 6
  • 7. Axioms for finding Closure of a relation 1. Reflexivity Rule --- If X is a set of attributes and Y is a subset of X, then X → Y holds. 2. Augmentation Rule --- If X → Y holds and W is a set of attributes, then WX → WY holds. 3. Transitivity Rule --- If X → Y and Y → Z holds, then X → Z holds. Derived Theorems from Axioms 4. Union Rule --- If X → Y and X → Z holds, then X → YZ holds. 5. Decomposition Rule --- If X → YZ holds, then so do X → Y and X → Z. 6. Pseudotransitivity Rule --- If X → Y and WY → Z hold then so does WX → Z. 7. Self-determination--- A → A 8. Composition --- If A → B and C → D then AC → BD 9. General Unification Theorem --- If A → B and C → D , then A U (C-B) → BD 7
  • 8. Example Student SNoSNo SNameSName CNoCNo CNameCName AddrAddr Instr.Instr. OfficeOffice 54255425 SusanSusan RossRoss 102102 Calc ICalc I ……SanSan Jose,Jose, CACA P.P. SmithSmith B42B42 RoomRoom 112112 78457845 DaveDave TurcoTurco 541541 Bio 10Bio 10 ......SanSan Diego,Diego, CACA L.L. TalipTalip B24B24 RoomRoom 210210 SNo -> SName CNo -> CName Instr -> Office SNo -> Addr CNo -> Instr 8
  • 9. Back to the Example SNoSNo SNameSName CNoCNo CNameCName AddrAddr Instr.Instr. OfficeOffice Based on the rules provided, the following dependencies can be derived. (SNo, CNo) →→ SNo (Rule 1) -- subset (SNo, CNo) →→ CNo (Rule 1) (SNo, CNo) →→ (SName, CName) (Rule 2) -- augmentation CNo →→ office (Rule 3) -- transitivity SNo →→ (SName, address) (Union Rule) etc. 9