Home » Database » Database miscellaneous » Question

Database miscellaneous

  1. Given relations r(w, x) and s(y, z), the result of select distinct w, x from r, s is guaranteed to be same as r, provided
    1. r has no duplicates and s is non-empty
    2. r and s have no duplicates
    3. s has no duplicates and r is non-empty
    4. r and s have the same number of tuples
Correct Option: A

Distinct keyword tells that it will give duplicate entries only once and if r has duplicate entries than it will not show them more than once which tells us that if answer is to be same as r then r should not have any duplicate entries.
Options (c) and (d) are completely wrong but in option (b) its also not necessary that s must also have no duplicate entries thus the answer is option (a).



Your comments will be displayed only after manual approval.