Given two relations R₁(A, B) and R₂(C, D), the result of following query
Given two relations R₁(A, B) and R₂(C, D), the result of following query
Select distinct A, B
From R₁, R₂
is guaranteed to be same as R₁ provided one of the following condition is satisfied.
Show answerHide answer
Correct answer: (B) R₁ has no duplicates and R₂ is non - empty
Explanation
The query takes the Cartesian product R₁ × R₂ and projects A, B with duplicates removed. If R₂ is empty the product is empty, so R₂ must be non-empty; and since DISTINCT removes duplicates, the result equals R₁ only if R₁ has no duplicates.