edited by
874 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

1.8k
views
1 answers
2 votes
admin asked Apr 1, 2020
1,782 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 EMPLOYEE);$10$9$5$0$
931
views
1 answers
1 votes
admin asked Apr 1, 2020
931 views
E-R model uses this symbol to represent weak entity set?Dotted rectangleDiamondDoubly outlined rectangleNone of these
1.1k
views
3 answers
1 votes
admin asked Apr 1, 2020
1,131 views
What is the modality of relationship, if there is no explicit need for relationship to occur?ZeroTwoThreeOne
2.0k
views
1 answers
1 votes
admin asked Apr 1, 2020
2,037 views
Assume transaction $A$ holds a shared lock $R.$ If transaction $B$ also requests for a shared lock on $R.$ It willresult in deadlock situationimmediately be grantedimmediately be rejectedbe granted as soon as it is released by $A$