Lossless join decomposition

From testwiki
Revision as of 02:15, 17 August 2024 by imported>Dexxor (Example: ce)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In database design, a lossless join decomposition is a decomposition of a relation r into relations r1,r2 such that a natural join of the two smaller relations yields back the original relation. This is central in removing redundancy safely from databases while preserving the original data.[1] Lossless join can also be called non-additive.[2]

Definition

A relation r on schema R decomposes losslessly onto schemas R1 and R2 if πR1(r)πR2(r)=r, that is r is the natural join of its projections onto the smaller schemas. A pair (R1,R2) is a lossless-join decomposition of R or said to have a lossless join with respect to a set of functional dependencies F if any relation r(R) that satisfies F decomposes losslessly onto R1 and R2.[3]

Decompositions into more than two schemas can be defined in the same way.[4]

Criteria

A decomposition R=R1R2 has a lossless join with respect to F if and only if the closure of R1R2 includes R1R2 or R2R1. In other words, one of the following must hold:[4]

  • (R1R2)(R1R2)F+
  • (R1R2)(R2R1)F+

Criteria for multiple sub-schemas

Multiple sub-schemas R1,R2,...,Rn have a lossless join if there is some way in which we can repeatedly perform lossless joins until all the schemas have been joined into a single schema. Once we have a new sub-schema made from a lossless join, we are not allowed to use any of its isolated sub-schema to join with any of the other schemas. For example, if we can do a lossless join on a pair of schemas Ri,Rj to form a new schema Ri,j, we use this new schema (rather than Ri or Rj) to form a lossless join with another schema Rk (which may already be joined (e.g., Rk,l)).Template:Vague

Example

  • Let R={A,B,C,D} be the relation schema, with attributes Template:Mvar, Template:Mvar, Template:Mvar and Template:Mvar.
  • Let F={ABC} be the set of functional dependencies.
  • Decomposition into R1={A,B,C} and R2={A,D} is lossless under Template:Mvar because R1R2=A and we have a functional dependency ABC. In other words, we have proven that (R1R2R1R2)F+.[5][6]

References

Template:Reflist