Skip to content
Official PYQ · 2005

GATE CS 2005 Q30 — Relational Model: Relational Algebra

Explain with AI

Let r be a relation instance with schema R = (A, B, C, D). We define r1=πA,B,C(R)r_1 = \pi_{A, B, C} (R) and r2=πA,D(r)r_2=\pi_{A, D} (r). Let s=r1 ∗ r2s =r_1 \: * \: r_2 where ∗* denotes natural join. Given that the decomposition of rr into r1r_1 and r2r_2 is lossy, which one of the following is TRUE?

Choose one option
View worked solution

Answer: C

For any relation rr with schema RR decomposed into projections r1=πX(r)r_1 = \pi_{X}(r) and r2=πY(r)r_2 = \pi_{Y}(r) such that X∪Y=RX \cup Y = R, the natural join of the projections always contains at least all the tuples of the original relation. That is:

r⊆(r1⋈r2)r \subseteq (r_1 \bowtie r_2)

Let s=r1⋈r2s = r_1 \bowtie r_2. Thus, we always have r⊆sr \subseteq s.

  • Lossless Join: If the decomposition is lossless, then s=rs = r.
  • Lossy Join: If the decomposition is lossy, the join generates additional spurious tuples, meaning ss contains more tuples than rr (r≠sr \neq s).

Since the problem states that the decomposition is lossy, we have:

r⊆sandr≠s  ⟹  r⊂sr \subseteq s \quad \text{and} \quad r \neq s \implies r \subset s

Let's evaluate the options:

  • Option A (s⊂rs \subset r): False, because ss contains more tuples than rr.
  • Option B (r∪s=rr \cup s = r): False. Since r⊂sr \subset s, we have r∪s=sr \cup s = s.
  • Option C (r⊂sr \subset s): True, as derived above.
  • Option D (r∗s=sr * s = s): False. Since both rr and ss share the same schema (A,B,C,D)(A, B, C, D), their natural join is equivalent to their intersection: r⋈s=r∩sr \bowtie s = r \cap s. Since r⊂sr \subset s, we get r∩s=r≠sr \cap s = r \neq s.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Relational Model: Relational Algebra questions