GATE / CS ARCHIVE

GATE CSE 1998 / QUESTION 1.33

Equijoin and intersection

Database Management Systems · Relational Algebra & Calculus · Full GATE CSE 1998 paper

GATE 1998, Q1.33 1 mark · MCQ
Report issue

Relational Algebra & Calculus

Question 1.33, GATE 1998: For union-compatible R1(A, B), R2(C, D), interpret R1 join on A=C and B=D R2. Choices include union, product, difference, intersection.
Tap to enlarge
Your answer
Answer & solution

Answer: D after projecting duplicate columns; raw theta join has four attributes (no official key was published)

A qualifying pair contains the same two values in both input relations. Thus each output is (a, b, a, b), one for each common tuple (a, b). Projecting onto A, B gives the intersection R1∩R2 after renaming, explaining D. But an ordinary theta join retains all four attributes A, B, C, D, whereas intersection has only two. They are not literally equal schemas without projection or a duplicate-column-eliminating join convention. This arity distinction is recorded rather than silently identifying the raw four-column relation with the two-column intersection.

Original paper, page 3