1 / 20

Lossless Decomposition

What is Decomposition?. Decomposition the process of breaking down in parts or elements.Decomposition in database means breaking tables down into multiple tablesFrom Database perspective means going to a higher normal form. Decomposition. Important that decompositions are good",Two Characte

mauritz
Télécharger la présentation

Lossless Decomposition

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. Lossless Decomposition Elias Aseged SE 157B - DB 2

    2. What is Decomposition? Decomposition the process of breaking down in parts or elements. Decomposition in database means breaking tables down into multiple tables From Database perspective means going to a higher normal form Go to a higher normal formGo to a higher normal form

    3. Decomposition Important that decompositions are good, Two Characteristics of Good Decompositions 1) Lossless 2) Preserve dependencies On the flip side, you could have a decomposition that is lossy (where you lose elements) Lossy means you lose information, not necessarily the loss of tuples. (not being able to distinguish different states of the original relation)On the flip side, you could have a decomposition that is lossy (where you lose elements) Lossy means you lose information, not necessarily the loss of tuples. (not being able to distinguish different states of the original relation)

    4. What is lossless? Lossless means functioning without a loss. In other words, retain everything. Important for databases to have this feature. Example of sports go undefeated throughout the year, you are lossless on the flip side, if you lost every game of the year, like SJSU mens basketball lol, then you are LOSSY!Example of sports go undefeated throughout the year, you are lossless on the flip side, if you lost every game of the year, like SJSU mens basketball lol, then you are LOSSY!

    5. Formal Definition Let R be a relation schema. Let F be a set of functional dependencies on R. Let and form a decomposition of R. The decomposition is a lossless-join decomposition of R if at least one of the following functional dependencies are in F+ 1) R1 n R2 ? R1 2) R1 n R2 ? R2

    6. In Simpler Terms R1 n R2 ? R1 R1 n R2 ? R2 If R is split into R1 and R2, for the decomposition to be lossless then at least one of the two should hold true. Projecting on R1 and R2, and joining back, results in the relation you started with If you can achieve the above operation If you can achieve the above operation

    7. Why lossless? Ensures that attributes involved in the natural join (R1 n R2) are a candidate key for at least one of the two relations. This ensures we can never get the situation where false tuples are generated, as for any value on the join attributes there will be a unique tuple in one of the relations.

    8. A decomposition is lossless if we can recover: R(A,B,C) R1(A,B) R2(A,C) R(A,B,C) should be the same as R(A,B,C)

More Related