1 / 7

Canonical Cover & Normal Forms

Canonical Cover & Normal Forms. January 7, 2020. Canonical Cover - 1. Given a relation R with a set of FDs F 4 steps to find a canonical cover for F: Step 1: Decompose all FDs in standard form Replace each FD X → A1A2…Ak in F with X→A1, X→A2, …, X→Ak. Canonical Cover - 2.

patporter
Download Presentation

Canonical Cover & Normal Forms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Canonical Cover & Normal Forms January 7, 2020

  2. Canonical Cover - 1 • Given a relation R with a set of FDs F • 4 steps to find a canonical cover for F: • Step 1:Decompose all FDs in standard form • Replace each FD X → A1A2…Ak in F with X→A1, X→A2, …, X→Ak

  3. Canonical Cover - 2 • Step 2:Eliminate unnecessary attributes from LHS • For every FD XA in F, check if the closure of a subset of X determines A. If so, remove redundant attribute(s) from X

  4. Canonical Cover - 3 • Step 3:Remove redundant FD(s) • For every FD XA in G • Remove XA from G, and call the result G’ • Compute X+under G’ • If A X+, then XA is redundant. Hence, we remove the FD XA from G (That is, we rename G’ to G)

  5. Canonical Cover - 4 • Step 4:Make LHS of FDs unique • Replace X→A1, X→A2, …, X→Ak with X → A1A2…Ak

  6. BCNF Requirements • We say R w.r.t. F is in BCNF if: • For every FD X  A in F, at least one of the following conditions is true: • A  X, that is, X  A is a trivial FD, OR • X is a super key

  7. 3NF Requirements • We say R w.r.t. F is in 3NF if: • For every FD X  A in F, at least one of the following conditions is true: • A  X, that is, X  A is a trivial FD, OR • Xis asuper key, OR • IfXis not a key, thenAis part of some key of R

More Related