You are on page 1of 8

Chapter 11

Functional
Dependencies
Topics in this Chapter

• Basic Definitions
• Trivial and Nontrivial Dependencies
• Closure of a Set of Dependencies
• Closure of a Set of Attributes
• Irreducible Sets of Dependencies

Copyright © 2004 Pearson Addison-Wesley. All rights reserved. 11-2


Functional Dependence

• Functional dependence is a many to one


relationship from one set of attributes to
another within a given relvar
• Let r be a relation, and let X and Y be subsets
of the attributes of r
• X  Y says
“Y is functionally dependent on X”, or
“X functionally determines Y”
• X is the determinant; Y the dependent

Copyright © 2004 Pearson Addison-Wesley. All rights reserved. 11-3


Trivial and Nontrivial Dependencies

• An FD is trivial if and only if the right side is


a subset of the left side
• { S#, P# }  S#
• All other dependencies are called nontrivial

Copyright © 2004 Pearson Addison-Wesley. All rights reserved. 11-4


Closure of a Set of Dependencies

• The set of all FDs that are implied by a given


set S of FDs is called the closure of S
• Armstrong’s axioms (see next slide) are used
to infer FDs from others
• Let A, B, and C be subsets of relvar R, and let
AB signify the union of A and B

Copyright © 2004 Pearson Addison-Wesley. All rights reserved. 11-5


Closure of a Set of Dependencies –
Armstrong’s Axioms

• Reflexivity: If B is a subset of A the A  B


• Augmentation: If A  B, then AC  BC
• Transitivity:If A  B and B  C,
then A  C
• Self-determination: A  A
• Decomposition: If A  BC,
then A  B and A  C
• Union: If A  B and A  C, then A  BC
• Composition: If A  B and C  D,
then AC  BD
Copyright © 2004 Pearson Addison-Wesley. All rights reserved. 11-6
Closure of a Set of Attributes

• The set of all attributes that are implied by a


given set of attributes S is called the closure
of S
• A superkey implies all the other attributes of a
relvar
• The nonkey attributes of a relvar represent a
closure of the superkey, but not necessarily an
irreducible one
• Any group of attributes for which all the other
attributes represent a closure is a superkey

Copyright © 2004 Pearson Addison-Wesley. All rights reserved. 11-7


Irreducible Sets of Dependencies

• Let S1 and S2 be two sets of FDs. If every


FD implied by S1 is implied by S2, then S2 is
a cover of S1
• A set S of FDs is irreducible iff:
• The right side of every FD in S involves one
attribute (a singleton set)
• The left side is irreducible
• No FD in S can be discarded without
changing the closure of S

Copyright © 2004 Pearson Addison-Wesley. All rights reserved. 11-8

You might also like