Multiple choice

Given relations: $\gamma$ (w, x) and S (y, z), the result of select distinct w, x. From r, S is guaranteed to be the same as $\gamma$, empty. Which among the following is correct?

  1. $\gamma$ has no duplicates and s is non empty.
  2. $\gamma$ and s have no duplicates.
  3. S has no duplicates and $\gamma$ is non empty.
  4. $\gamma$ and S have the same number of tuples.
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

For SELECT DISTINCT w,x FROM r,S to equal r, relation r must have no duplicate (w,x) pairs (otherwise DISTINCT would reduce count) and S must be non-empty (Cartesian product with empty relation yields empty).