A a a 1 2 n b a a a 12 nin english though a bit vague

  • No School
  • AA 1
  • 36

This preview shows page 29 - 36 out of 36 pages.

A , A , … A 1 2 n B A , A , … A 1 2 n In English (though a bit vague): Whenever a set of attributes of R is determining another attribute, should determine all the attributes of R .
Image of page 29
Example Name SSN Phone Number Fred 123-321-99 (201) 555-1234 Fred 123-321-99 (206) 572-4312 Joe 909-438-44 (908) 464-0028 Joe 909-438-44 (212) 555-4000 What are the dependencies? SSN Name What are the keys? Is it in BCNF?
Image of page 30
Decompose it into BCNF SSN Name 123-321-99 Fred 909-438-44 Joe SSN Phone Number 123-321-99 (201) 555-1234 123-321-99 (206) 572-4312 909-438-44 (908) 464-0028 909-438-44 (212) 555-4000 SSN Name
Image of page 31
What About This? Name Price Category Gizmo $19.99 gadgets OneClick $24.99 camera Name Price, Category
Image of page 32
BCNF Decomposition Find a dependency that violates the BCNF condition: A , A , … A 1 2 n B , B , … B 1 2 m A’s Others B’s R1 R2 Heuristics: choose B , B , … B “as large as possible” 1 2 m Decompose: Find a 2-attribute relation that is not in BCNF. Continue until there are no BCNF violations left.
Image of page 33
Example Decomposition Name SSN Age EyeColor PhoneNumber Functional dependencies: SSN Name, Age, Eye Color What if we also had an attribute Draft-worthy, and the FD: Age Draft-worthy Person: BNCF: Person1( SSN, Name, Age, EyeColor ), Person2( SSN, PhoneNumber )
Image of page 34
Other Example R( A,B,C,D ) A B, B C Key: Violations of BCNF: Pick : split into R1( ) R2( )
Image of page 35
Correct Decompositions A decomposition is lossless if we can recover: R(A,B,C) R1(A,B) R2(A,C) R’(A,B,C) = R(A,B,C) R’ is in general larger than R. Must ensure R’ = R
Image of page 36

You've reached the end of your free preview.

Want to read all 36 pages?

  • Fall '19
  • Database normalization

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

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors