Lossless join decomposition

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. Lossless join can also be called non-additive.

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.

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

Criteria

A decomposition R=R1∪R2 has a lossless join with respect to F if and only if the closure of R1∩R2 includes R1∖R2 or R2∖R1. In other words, one of the following must hold:

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)).[vague]

Efficient algorithms exist to determine whether the join of several relations is lossless, assuming all data dependencies are functional. The standard polynomial-time method for testing whether a decomposition into multiple sub-schemas is lossless under a set of functional dependencies is the chase algorithm. The algorithm operates by initializing a tableau matrix with distinguished and non-distinguished variables representing the attributes and schemas, then iteratively applying functional dependencies to equate variables until a fixed point is reached. If any row becomes entirely composed of distinguished variables, the decomposition is lossless.

Example

See also

References

  1. ↑ Pohler, K (2015). "Lossless-Join Decomposition: applications in quantitative computing metrics". International Journal of Applied Computer Science. 21 (4): 190–212.
  2. ↑ Elmasri, Ramez (2016). Fundamentals of database systems (Seventh ed.). Hoboken, NJ: Pearson. p. 461. ISBN 978-0133970777.
  3. ↑ Maier, David (1983). The theory of relational databases (PDF). Computer Science Press. p. 101. ISBN 0-914894-42-0. Retrieved 16 August 2024.
  4. 1 2 Ullman, Jeffrey D. (1988). Principles of Database and Knowledge-base Systems (PDF) (1 ed.). Computer Science Press. p. 397. ISBN 0-88175188-X. Retrieved 16 August 2024.
  5. 1 2 Aho, Alfred V.; Beeri, Catriel; Ullman, Jeffrey D. (1979). "The theory of joins in relational databases". ACM Transactions on Database Systems. 4 (3). Association for Computing Machinery: 297–314. doi:10.1145/320083.320091. Retrieved 2026-10-07.
  6. ↑ "Lossless-Join Decomposition". Cs.sfu.ca. Retrieved 2016-02-07.
  7. ↑ "www.data-e-education.com - Lossless Join Decomposition". Archived from the original on 2014-02-21. Retrieved 2014-02-12.