Eliminating bad FD X A for all A 76 S 2 X W S 1 X R X X X W X X X X W R S 1 X S

Eliminating bad fd x a for all a 76 s 2 x w s 1 x r x

This preview shows page 75 - 82 out of 91 pages.

Eliminating bad FD X → A (for all A )
Image of page 75

Subscribe to view the full document.

76 S 2 = X ∪ W S 1 = X + R X + \X X W X + \X X X W R S 1 = X + S 2 = X ∪ W R 2 Algorithm Decomposition( X ) 1. Compute S 1 = X + using the FDs in R; 2. Let W be the set of attributes that are not in S 1 ; 3. Make a relation R 1 of schema S 1 ; 4. Make a relation R 2 with schema S 2 = X W ; 5. Compute the FDs for R 1 and R 2 . Eliminating bad FD X → A (for all A )
Image of page 76
77 S 2 = X ∪ W S 1 = X + X + \X X W X + \X X X W R S 1 = X + S 2 = X ∪ W R 2 = π (R) S 2 Algorithm Decomposition( X ) 1. Compute S 1 = X + using the FDs in R; 2. Let W be the set of attributes that are not in S 1 ; 3. Make a relation R 1 of schema S 1 ; 4. Make a relation R 2 with schema S 2 = X W ; 5. Compute the FDs for R 1 and R 2 . Eliminating bad FD X → A (for all A )
Image of page 77

Subscribe to view the full document.

78 How ? Algorithm Decomposition( X ) 1. Compute S 1 = X + using the FDs in R; 2. Let W be the set of attributes that are not in S 1 ; 3. Make a relation R 1 of schema S 1 ; 4. Make a relation R 2 with schema S 2 = X W ; 5. Compute the FDs for R 1 and R 2 . Eliminating bad FD X → A (for all A )
Image of page 78
79 Algorithm Decomposition( X ) 1. Compute S 1 = X + using the FDs in R; 2. Let W be the set of attributes that are not in S 1 ; 3. Make a relation R 1 of schema S 1 ; 4. Make a relation R 2 with schema S 2 = X W ; 5. Compute the FDs for R 1 and R 2 . How ? Algorithm Decomposed-FDs( R 1 ) 1. T 1 = ; \\ T 1 is the FDs for R 1 2. For each subset Y of S 1 Do 2.1 compute Y + using the FDs in R; 2.2 For each A in S 1 ∩( Y + \ Y ) add Y → A to T 1 ; 3. While changes Do 3.1 Drop from T 1 those FDs that are derivable from the others; 3.2 For each XB → A in T 1 , if X → A is implied by T 1 , then replace XB → A in T by X → A . Eliminating bad FD X → A (for all A )
Image of page 79

Subscribe to view the full document.

80 Example. R = ABC with T = {A→B, B→C} . Algorithm Decomposition( X ) 1. Compute S 1 = X + using the FDs in R; 2. Let W be the set of attributes that are not in S 1 ; 3. Make a relation R 1 of schema S 1 ; 4. Make a relation R 2 with schema S 2 = X W ; 5. Compute the FDs for R 1 and R 2 . Algorithm Decomposed-FDs( R 1 ) 1. T 1 = ; \\ T 1 is the FDs for R 1 2. For each subset Y of S 1 Do 2.1 compute Y + using the FDs in R; 2.2 For each A in S 1 ∩( Y + \ Y ) add Y → A to T 1 ; 3. While changes Do 3.1 Drop from T 1 those FDs that are derivable from the others; 3.2 For each XB → A in T 1 , if X → A is implied by T 1 , then replace XB → A in T by X → A . Eliminating bad FD X → A (for all A )
Image of page 80
81 Example. R = ABC with T = {A→B, B→C} . The only key is A , so B → C is a bad FD. Algorithm Decomposition( X ) 1. Compute S 1 = X + using the FDs in R; 2. Let W be the set of attributes that are not in S 1 ; 3. Make a relation R 1 of schema S 1 ; 4. Make a relation R 2 with schema S 2 = X W ; 5. Compute the FDs for R 1 and R 2 . Algorithm Decomposed-FDs( R 1 ) 1. T 1 = ; \\ T 1 is the FDs for R 1 2. For each subset Y of S 1 Do 2.1 compute Y + using the FDs in R; 2.2 For each A in S 1 ∩( Y + \ Y ) add Y → A to T 1 ; 3. While changes Do 3.1 Drop from T 1 those FDs that are derivable from the others; 3.2 For each XB → A in T 1 , if X → A is implied by T 1 , then replace XB → A in T by X → A .
Image of page 81

Subscribe to view the full document.

Image of page 82
  • Fall '14

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes