Answers for "how to check if a decomposition is lossless"

0

how to check if a decomposition is lossless

Consider a relation R is decomposed into R1 and R2:
Decomposition is lossy if R1 ⋈ R2 ⊃ R
Decomposition is lossless if R1 ⋈ R2 = R
(where ⋈ is the natural join operator)

To check losslessness, the following conditions must hold:
a) Att(R1) U Att(R2) = Att(R) (every attribute must be in the decomposition)
b) Att(R1) ∩ Att(R2) ≠ Φ	  (the decomposition must have attributes in common)
c) Att(R1) ∩ Att(R2) -> Att(R1) or Att(R1) ∩ Att(R2) -> Att(R2)
		(the common attributes must be a key of at least one of R1 and R2)
------------------------------------------------------------------------------
When a relation is decomposed into more than two sub-relations:
Consider the decomposition R1, R2, R3
This decomposition is lossless if every attribute is in the decomposition AND
there is at least one way such that properties (b) and (c) hold for two
of the sub-relations (for example R1 and R2), and the properties (b) and (c)
also hold for the union of the first two sub-relations and the third one
for example: (R1 U R2) and R3

So a decomposition is lossless if there is at least one order in which
you can join the sub-relations such that every join is lossless
e.g.: (R1 ⋈ R3) ⋈ ((R2 ⋈ R4) ⋈ R5) = R

(other source: https://www.gatevidyalay.com/determine-whether-the-decomposition-is-lossless-or-lossy/)
Posted by: Guest on April-05-2022

Code answers related to "how to check if a decomposition is lossless"

Browse Popular Code Answers by Language