Open In App

GATE | GATE-CS-2003 | Question 30

Consider the following SQL query
select distinct al, a2,........., an
from r1, r2,........, rm
where P 
For an arbitrary predicate P, this query is equivalent to which of the following relational algebra expressions ? A: B: C: D: (A) A (B) B (C) C (D) D
Answer:(A)
Explanation:
Cross product (x) combines the tuples of one relation with all the tuples of the other relation. Thus, tuples of relation r1, r2 …. rn are combined.
Select operator is used to select resultant tuples.
Projection operator is used to select a subset of attributes from the resultant tuples by specifying the names of the attributes. So attributes a1, a2, an are projected from the resultant tuples.
 
Thus, option (A) is correct.
 
Please comment below if you find anything wrong in the above post.
Quiz of this Question
Article Tags :