# Lossless-Join Decomposition

In computer science the concept of a Lossless-Join Decomposition is central in removing redundancy safely from databases while preserving the original data.

## Lossless-join Decomposition

Can also be called Nonadditive. If you decompose a relation ${\displaystyle R}$ into relations ${\displaystyle R_{1}}$, ${\displaystyle R_{2}}$ you will guarantee a Lossless-Join if ${\displaystyle R_{1}}$x${\displaystyle R_{2}}$ = ${\displaystyle R}$.

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.[1]

Let ${\displaystyle R}$ be a relation schema.

Let ${\displaystyle F}$ be a set of functional dependencies on ${\displaystyle R}$.

Let ${\displaystyle R_{1}}$ and ${\displaystyle R_{2}}$ form a decomposition of ${\displaystyle R}$.

The decomposition is a lossless-join decomposition of R if at least one of the following functional dependencies are in ${\displaystyle F}$+ (where ${\displaystyle F}$+ stands for the closure for every attribute or attribute sets in ${\displaystyle F}$):[2]

• ${\displaystyle R_{1}}$ ∩ ${\displaystyle R_{2}}$${\displaystyle R_{1}}$
• ${\displaystyle R_{1}}$ ∩ ${\displaystyle R_{2}}$${\displaystyle R_{2}}$

## Example

• Let ${\displaystyle R=(A,B,C,D)}$ be the relation schema, with ${\displaystyle A}$, ${\displaystyle B}$, ${\displaystyle C}$ and ${\displaystyle D}$ attributes.
• Let ${\displaystyle F=\{A\rightarrow BC\}}$ be the set of functional dependencies.
• Decomposition into ${\displaystyle R_{1}=(A,B,C)}$ and ${\displaystyle R_{2}=(A,D)}$ is lossless under ${\displaystyle F}$ because ${\displaystyle R_{1}\cap R_{2}=(A)}$, ${\displaystyle A}$ is a superkey in ${\displaystyle R_{1}}$ ( ${\displaystyle A\rightarrow BC}$ ) so ${\displaystyle R_{1}\cap R_{2}\rightarrow R_{1}}$.

## References

1. ^ "Lossless Join Property". stackoverflow.com. Retrieved 2016-02-07.
2. ^ "Lossless Join Decomposition" (PDF). University at Buffalo. Jan Chomicki. Retrieved 2012-02-08.
3. ^ "Lossless-Join Decomposition". www.cs.sfu.ca. Retrieved 2016-02-07.
4. ^ http://www.data-e-education.com/E121_Lossless_Join_Decomposition.html