Skip to main content

Lossless and dependency preserving check 4

Short answer

Lossless join (A is a key). Not dependency preserving: CD→E and B→D span both relations and are lost.

R = (A, B, C, D, E), R1 = (A, B, C), R2 = (A, D, E). F = {A → BC, CD → E, B → D, E → A}. Check whether the decomposition is lossless and dependency preserving.

R = (A, B, C, D, E), R1 = (A, B, C), R2 = (A, D, E), F = {A → BC, CD → E, B → D, E → A}.

Lossless join test

R1 ∩ R2 = {A}. A⁺ = {A, B, C, D, E} (A → BC, B → D, CD → E), so A is a key of R1 and R2 and A → R1 holds.

Chase table:

ABCDE
R1aaabb
R2abbaa

A → BC: both rows have A = a, so B and C in R2 become a. B → D: both rows now have B = a, so D in R1 becomes a. CD → E: both rows have C = a and D = a, so E in R1 becomes a. Both rows are all "a".

The decomposition is lossless.

Dependency preservation test

Projections:

  • F1 on (A, B, C): A → BC (A⁺ ∩ R1 = ABC). B⁺ = BD and C⁺ = C add nothing inside R1. So F1 = {A → BC}.
  • F2 on (A, D, E): E → A (E⁺ = ABCDE, so E → AD), A → DE (A⁺ ∩ R2 = ADE), AD → E.

Check:

  • A → BC: in F1. Preserved.
  • E → A: in F2. Preserved.
  • CD → E: C is in R1 only and D in R2 only; (C)⁺ ∩ R1 = C, (D)⁺ ∩ R2 = D. E is not reached through A either (neither C nor D gives A). Lost.
  • B → D: B in R1 only; B⁺ ∩ R1 = {B}. D not reached. Lost.

The decomposition is NOT dependency preserving (CD → E and B → D are lost).

Answer: lossless, but not dependency preserving.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Database Management System chapter 4 questions →