Lossless join decomposition explained
into relations
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
on schema
decomposes losslessly onto schemas
and
if
, that is
is the natural join of its
projections onto the smaller schemas.A pair
is a
lossless-join decomposition of
or said to
have a lossless join with respect to a set of
functional dependencies
if any relation
that satisfies
decomposes losslessly onto
and
.
[3] Decompositions into more than two schemas can be defined in the same way.
Criteria
A decomposition
has a lossless join with respect to
if and only if the closure of
includes
or
. In other words, one of the following must hold:
[4] (R1\capR2)\to(R1\setminusR2)\inF+
(R1\capR2)\to(R2\setminusR1)\inF+
Criteria for multiple sub-schemas
Multiple sub-schemas
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
to form a new schema
, we use this new schema (rather than
or
) to form a lossless join with another schema
(which may already be joined (e.g.,
)).
Example
be the relation schema, with attributes,, and .
be the set of functional dependencies.
and
is lossless under because
and we have a functional dependency
. In other words, we have proven that
(R1\capR2 → R1\setminusR2)\inF+
.
[5] [6] Notes and References
- Pohler . K . Lossless-Join Decomposition: applications in quantitative computing metrics . International Journal of Applied Computer Science . 2015 . 21 . 4 . 190–212.
- Book: Elmasri . Ramez . Fundamentals of database systems . 2016 . Pearson . 978-0133970777 . Seventh . Hoboken, NJ . 461.
- Book: Maier . David . The theory of relational databases . 1983 . Computer Science Press . 0-914894-42-0 . 101 . 16 August 2024.
- Book: Ullman . Jeffrey D. . Principles of Database and Knowledge-base Systems . 1988 . Computer Science Press . 0-88175188-X . 397 . 1 . 16 August 2024.
- Web site: Lossless-Join Decomposition. Cs.sfu.ca. 2016-02-07.
- Web site: www.data-e-education.com - Lossless Join Decomposition . 2014-02-12 . https://web.archive.org/web/20140221081148/http://www.data-e-education.com/E121_Lossless_Join_Decomposition.html . 2014-02-21 . dead.