Multiple choice

Given relations r(w,x) and s(y,z), the result of select distinct w,x from r,s is guaranteed to be the same as r, provided

  1. r has no duplicate and s is non empty

  2. r and s have no duplicate

  3. s has no duplicate and r is non empty

  4. r and s have the same number of tuples

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The query selects all attributes of r. Since we have distinct in query, result can be equal to r only if r doesn’t have duplicates.If we do not give any attribute on which we want to join two tables, then the queries like above become equivalent to Cartesian product. Cartisian product of two sets will be empty if any of the two sets is empty. So, s should have atleast one record to get all rows of r.