Consider the following relations A, B and C: How many tuples does the result…
2012
Consider the following relations A, B and C:

How many tuples does the result of the following relational algebra expression contain? Assume that the schema of \(A \cup B\) is the same as that of \(A\).
\((A\cup B)\bowtie _{A.Id > 40 \vee C.Id < 15} C\)
- A.
7
- B.
4
- C.
5
- D.
9
Attempted by 142 students.
Show answer & explanation
Correct answer: A
Key idea: evaluate A ∪ B, list the Ids, and apply the join condition for each C row.
Compute A ∪ B: distinct tuples have Ids 12, 15, 99, 25, 98 (5 tuples).
C has Ids 10 and 99 (2 tuples).
For C.Id = 10: C.Id < 15 is true, so every left tuple matches → 5 pairs.
For C.Id = 99: C.Id < 15 is false, so we need left.Id > 40. Left Ids > 40 are 98 and 99 → 2 pairs.
Total pairs = 5 + 2 = 7.
Answer: 7 tuples.
A video solution is available for this question — log in and enroll to watch it.