Let r be a relation instance with schema R = (A, B, C, D). We define r1 = ΠA,…

2005

Let r be a relation instance with schema R = (A, B, C, D). We define r1 = ΠA, B, C (r) and r2 = ΠA.D (r). Let s = r1 * r2 where * denotes natural join. Given that the decomposition of r into r1 and r2 is lossy, which one of the following is TRUE?

  1. A.

    s ⊂ r

  2. B.

    r ∪ s

  3. C.

    r ⊂ s

  4. D.

    r * s = s

Attempted by 187 students.

Show answer & explanation

Correct answer: C

Answer: r ⊂ s

Reasoning:

  • Definitions: r1 = Π A,B,C (r) has attributes A,B,C; r2 = Π A,D (r) has attributes A,D; s = r1 ⋈ r2 is the natural join on attribute A producing tuples with attributes A,B,C,D.

  • Lossy decomposition means projections lose constraints that related the attributes; when you join the projections back you can create spurious tuples that were not present in the original relation.

  • Concrete example: let r contain (A=1,B=b1,C=c1,D=d1) and (A=1,B=b2,C=c2,D=d2). Then r1 = {(1,b1,c1),(1,b2,c2)} and r2 = {(1,d1),(1,d2)}. The join r1 ⋈ r2 yields four tuples by pairing each (B,C) with each D, producing tuples such as (1,b1,c1,d2) that were not in r. Thus s strictly contains r.

  • Conclusion: the original relation r is a proper subset of the join result s (r ⊂ s). The other candidate statements are false or ambiguous: claiming the join is a subset of r is wrong, a bare 'r ∪ s' is not a complete assertion, and r ⋈ s = s is false (for same-schema relations the join acts like intersection, so r ⋈ s = r when r ⊂ s).

Explore the full course: Gate Guidance By Sanchit Sir