If X Z then X is a superkey From here we can also find all keys If X Z and X X

If x z then x is a superkey from here we can also

This preview shows page 64 - 76 out of 91 pages.

If X + = Z , then X is a superkey. From here, we can also find all keys. If X + Z, and X + X , then X X + \ X is a bad FD. Normalization
Image of page 64

Subscribe to view the full document.

65 Thus, on a given relation R with attribute set Z and FDs S , for each subset X of Z , we can compute X + using S . If X + = Z , then X is a superkey. From here, we can also find all keys. If X + Z, and X + X , then X X + \ X is a bad FD. Then we use “ normalization ”, which breaks a relation into several relations, to eliminate bad FDs. Normalization
Image of page 65
66 Thus, on a given relation R with attribute set Z and FDs S , for each subset X of Z , we can compute X + using S . If X + = Z , then X is a superkey. From here, we can also find all keys. If X + Z, and X + X , then X X + \ X is a bad FD. Then we use “ normalization ”, which breaks a relation into several relations, to eliminate bad FDs. Should also take care of FDs in the resulting relations. Normalization
Image of page 66

Subscribe to view the full document.

67 Some Tricks No need to compute the closure of the empty set or of the set of all attributes.
Image of page 67
68 Some Tricks No need to compute the closure of the empty set or of the set of all attributes. If we find X + = Z (i.e., all attributes), then so is the closure of any superset of X .
Image of page 68

Subscribe to view the full document.

69 Eliminating bad FD X → A (for all A )
Image of page 69
70 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 70

Subscribe to view the full document.

71 X R 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 71
72 S 1 = X + X + \X X R 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 72

Subscribe to view the full document.

73 S 1 = X + X + \X X W R 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 73
74 S 2 = X ∪ W S 1 = X + X + \X X W R 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 74

Subscribe to view the full document.

75 S 2 = X ∪ W S 1 = X + X + \X X W X + \X X X W R S 1 = X + S 2 = X ∪ W 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 .
Image of page 75
Image of page 76
  • 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