edited by
830 views
1 votes
1 votes

Given relations $R(w,x)$ and $S(y,z),$ the result of 

SELECT DISTINCT $w,x$ from $R,S$

  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$ has the same number of tuples
edited by

3 Answers

1 votes
1 votes
The query selects all attributes of R (since we are selecting A, B). Since we have distinct in query, result can be equal to R only if R does not 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. Cartesian 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. So, answer is option (a).
1 votes
1 votes
ANS : A

R has no duplicates and S is non-empty
Answer:

Related questions

2 votes
2 votes
1 answer
1
admin asked Apr 1, 2020
1,619 views
Table employees has $10$ records. It has a non-NULL SALARY column which is also UNIQUE. The SQL statementSELECT COUNT(*)FROM EMPLOYEEWHERE SALARY ALL (SELECT SALARY FROM...
1 votes
1 votes
1 answer
2
admin asked Apr 1, 2020
903 views
E-R model uses this symbol to represent weak entity set?Dotted rectangleDiamondDoubly outlined rectangleNone of these
1 votes
1 votes
3 answers
3
admin asked Apr 1, 2020
1,046 views
What is the modality of relationship, if there is no explicit need for relationship to occur?ZeroTwoThreeOne