Download presentation

Presentation is loading. Please wait.

Published byVance Copas Modified about 1 year ago

1
Chapter 11 Functional Dependencies

2
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-2 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

3
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-3 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

4
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-4 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

5
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-5 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

6
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-6 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

7
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-7 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

8
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.11-8 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

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google