355 views

1 Answer

Best answer
2 votes
2 votes

Here the catch is :

count(*) always results to non null result of the subquery..In worst case it will result in 0 but not null

Hence in this query which is given , it is an example of nested query with correlation..And for this we take a value of R.C and then check it with every tuple of S for the condition which is given in the subquery..This condition evaluates to be false for each instance of S..Consequently the count(*) will be 0 for an instance of R of outer query..And this will happen with other tuples of R also..

But the thing is that the count(*) will give 0 which is considered non empty hence EXISTS clause will return true for each tuple of R..Hence all values of A of R will come in output..

Hence the correct answer is 3 here.. 

selected by
Answer:

Related questions

0 votes
0 votes
1 answer
1
Mrityudoot asked Jan 12
128 views
Isn’t F$^{+}$ minimal cover? If C $\rightarrow$ A is already there, then why does augmented CD $\rightarrow$ A needs to be?
0 votes
0 votes
1 answer
2
1 votes
1 votes
1 answer
3
Sajal Mallick asked Nov 5, 2023
336 views
Unique not null is equivalent to primary key.Relational Algebra and SQL has same expressive power.Which of the above statements are False?
2 votes
2 votes
1 answer
4
kaustubh7 asked Sep 20, 2023
401 views
Consider a relation R having seven attributes ABCDEFG. Fields of R contain only atomic values.FDs = {CD → G, A → BC, B → CF, E → A, F → EG, G → D} is set of f...