Use the given FDs to infer that these tuples must also agree in certain other

Use the given fds to infer that these tuples must

This preview shows page 53 - 65 out of 91 pages.

Use the given FD’s to infer that these tuples must also agree in certain other attributes. * If A is one of these attributes, then Y → A holds. Inference Test xx … xx yy … yy xx … xx ?? … ? Y
Image of page 53

Subscribe to view the full document.

54 To test if Y → A , start by assuming two tuples agree in all attributes of Y . Use the given FD’s to infer that these tuples must also agree in certain other attributes. * If A is one of these attributes, then Y → A holds. * Otherwise, the two tuples, with any forced equalities, form a two-tuple relation that proves that Y → A does not follow from the given FD’s. Inference Test xx … xx yy … yy xx … xx ?? … ? Y
Image of page 54
55 An easier way to test Y → A is to compute the closure of Y , denoted Y + . Inference Test (computing closure)
Image of page 55

Subscribe to view the full document.

56 An easier way to test Y → A is to compute the closure of Y , denoted Y + . Inference Test (computing closure) Algorithm Closure( Y ) 1. Y + = Y ; 2. While changes Do 2.1 look for an FD X → B where X is a subset of Y + but B is not in Y + ; 2.2 add B to Y + ; 3. every A in Y + \ Y satisfies Y → A
Image of page 56
57 An easier way to test Y → A is to compute the closure of Y , denoted Y + . Inference Test (computing closure) Y + Algorithm Closure( Y ) 1. Y + = Y ; 2. While changes Do 2.1 look for an FD X → B where X is a subset of Y + but B is not in Y + ; 2.2 add B to Y + ; 3. every A in Y + \ Y satisfies Y → A
Image of page 57

Subscribe to view the full document.

58 An easier way to test Y → A is to compute the closure of Y , denoted Y + . Inference Test (computing closure) Y + X A Algorithm Closure( Y ) 1. Y + = Y ; 2. While changes Do 2.1 look for an FD X → B where X is a subset of Y + but B is not in Y + ; 2.2 add B to Y + ; 3. every A in Y + \ Y satisfies Y → A
Image of page 58
59 An easier way to test Y → A is to compute the closure of Y , denoted Y + . Inference Test (computing closure) Y + new Y + X A Algorithm Closure( Y ) 1. Y + = Y ; 2. While changes Do 2.1 look for an FD X → B where X is a subset of Y + but B is not in Y + ; 2.2 add B to Y + ; 3. every A in Y + \ Y satisfies Y → A
Image of page 59

Subscribe to view the full document.

60 An easier way to test Y → A is to compute the closure of Y , denoted Y + . Inference Test (computing closure) Y + new Y + X A Algorithm Closure( Y ) 1. Y + = Y ; 2. While changes Do 2.1 look for an FD X → B where X is a subset of Y + but B is not in Y + ; 2.2 add B to Y + ; 3. every A in Y + \ Y satisfies Y → A It can be proved that the Algorithm Closure(Y) finds exactly those FDs Y → A implied by the given FDs.
Image of page 60
61 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 . Normalization
Image of page 61

Subscribe to view the full document.

62 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. Normalization
Image of page 62
63 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. Normalization
Image of page 63

Subscribe to view the full document.

64 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 .
Image of page 64
Image of page 65
  • 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