Consider the following two relations, and :
The total number of tuples obtained by evaluating the following expression
is ___________.
The total number of tuples obtained by evaluating the following expression
is ___________.
GATE CSE 2024Databases › Relational Algebra & CalculusVerified
2
Evaluate the expression inside-out: first perform the equipjoin of R and S on their common attribute A (matching R.A with S.A), producing tuples over (A, B, C). Then apply the selection condition $σ_{B\<C} \text{to keep only those joined tuples where} B \text{is strictly less than} C,$ and count the survivors.
The join produces 3 tuples sharing A values 10 and 30; the filter B<C removes only the tuple (30,50,45) since 50 is not less than 45. Hence the expression returns exactly 2 tuples.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.