Professional Documents
Culture Documents
Ghani DBMS Functional Dependencies
Ghani DBMS Functional Dependencies
- Functional dependencies-
• Bad designs for a relational database may result in erroneous results for certain JOIN
operations
• The "lossless join" property is used to guarantee meaningful results for join operations
• GUIDELINE 4:
– The relations should be designed to satisfy the lossless join condition.
No spurious tuples should be generated by doing a natural-join of any relations
• Employee ssn and project number determines the hours per week that the employee works on
the project
• The last three inference rules, as well as any other inference rules, can be deduced from IR1,
IR2, and IR3 (completeness property)
Example:
• Given the set F={AàB,CàX,BXàZ} derive ACàZ using the inference axioms. Assume that
all these attributes belong to a relational scheme R not shown here.
• Solun:-
AXàZ (Pseudotransitivity)
ACàZ.(Pseudotransitivity)
Example:
• Given F={AàB, CàD} with C subset of B, Show that AàD.
• Closure of a set of attributes X with respect to F is the set X + of all attributes that are
functionally determined by X
• X+ can be calculated by repeatedly applying IR1, IR2, IR3 using the FDs in F
• Definition (Covers):
• Let’s consider a relation with attributes A, B, C, D, E and F. Suppose that this relation
satisfies the FD’s:
AB®C,
BC®AD,
D®E,
CF®B.
What is {A,B}+?
• Iterations:
• The FD: CF®B cannot be used because its left side is never contained in X.