lec11.366

lec11.366 - . . Winter 2008 CPE/CSC 366: Database Modeling,...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
. . Winter 2008 CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar . . Decomposition of Functional Relations Examples Closure Algorithm Example 1. Consider a relation R ( A,B,C,D,E,F ) with asserted FDs (1) A B,C (2) F E (3) B,F,E D (4) A,D E (5) C,E, D,F Problem 1: Find { A } + . Solution . We start with set X 0 = { A } . The left side of FD (1) is A X 0 . We set X 1 = { A } ∪ { B,C } = { A,B,C } . The left sides of FDs (2),(3),(4),(5) are not proper subsets of X 1 . Therefore, { A } + = X 1 = { A,B,C } . Problem 2: Find { A,D } + . Solution . We start with set X 0 = { A,D } . The left side of FD (1) is { A } ⊆ X 0 . We set X 1 = { A }∪{ B,C } = { A,B,C } . The left side of FD (4) is { A,D } ⊆ X 1 . We set X 2 = X 1 ∪{ E } = { A,B,C,D,E } . The left side of FD (5) is { C,E } ⊆ X 2 . We set X 3 = X 2 ∪ { D,F } = { A,B,C,D,E,F } . X 3 contains all attributes from R , therefore { A,D } + = X 3 = { A,B,C,D,E,F } . FD Projection Algorithm Example 2. Consider a relation R ( A,B,C,D,E,F ) with asserted FDs (1) A B,C (2) F E (3) B,F,E D (4) A,D E (5) C,E, D,F Problem 1: Find FDs asserted on R 1 = π A,B,C,D ( R ) 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Solution. Start with S 0 = . We consider all subsets of { A,B,C,D } in turn. { A } : left side of FD (1) is A . Right side of FD (1) is { B,C } ⊆ { A,B,C,D } . S
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/19/2008 for the course CSC 365 taught by Professor Dekhtyar during the Spring '08 term at Cal Poly.

Page1 / 4

lec11.366 - . . Winter 2008 CPE/CSC 366: Database Modeling,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online