Database Management System
By Assist Professor Malik M Ali
Rules of Inference for Functional Dependencies
Let A,B,C and D be subsets of attributes of a Relation R
Reflexivity
If A B where B CA. This also implies that A A
always holds. FDs of this type is known as trivial FDs
A B then A A U B
A B then A A nB
Augmentation
If A B, then A,C B,C
Transitive dependency
A B, B C then A C
Rules of Inference for Functional Dependencies
Additivityor Union
If A B and A C, then A B,C
Decomposition
If A B,C then A B and A C
PseudoTransitivity
If A B and B,C D then A,C D
1.Relation R{A,B,C,D}
FD {A B, B C, C D}
A
+
= ABCD
B
+
= BCD
C
+
= CD
Only One Candidate Key Identified i.e. A
2.Relation R{A,B,C,D}
FD {A B, B C, C D, D A}
A
+
= ABCD
B
+
= BCDA
C
+
= CDAB
D
+
= DABC
FOUR CANDIDATE KEYS IDENTIFIED
Closure Method
Relation R as Eight Attributes R{A,B,C,D,E,F,G,H}
F = {CH G, A BC, B CFH, EA, FEG}
Identify number of Candidate Keys in R?
D
+
= D
1.AD
+
= ADBCFHEG
2.ED
+
= EDABCFHG
3.FD
+
= DEGABCFH
4.BD
+
= CDFHEGAB
Closure Method
Closure Method
Relation R as five Attributes R{A,B,C,D,E}
FD = {A B, BC D, EC, DA}
Identify number of Candidate Keys in R?
AE = ABCED
BE = ?
CE = ?
Closure of Attributes
Is Aakey for R?
Compute Closure of A and if it equals all attributes of that
relation than Ais a key.
NIC_NumStdName, StdAddress,
Percentage
HighSchoolCodeBoardofEdu,
HighschoolName, HighschoolCity
Percentage Priority
{NIC_Num, HSCode}+
{NIC_Num, HSCode, StdName, StdAddress, Percentage,
Priority, BoardofEdu, HighschoolName, HighschoolCity}