...
Question 10831 – APPSC-2016-DL-CS
March 19, 2024
Waterfall-model
March 19, 2024
Question 10831 – APPSC-2016-DL-CS
March 19, 2024
Waterfall-model
March 19, 2024

UGC NET CS 2016 Aug- paper-3

Question 11
Consider the following ORACLE relations :
One (x, y) = {<2, 5>, <1, 6>, <1, 6>, <1, 6>, <4, 8>, <4, 8>}
Two (x, y) = {<2, 55>, <1, 1>, <4, 4>, <1, 6>, <4, 8>, <4, 8>, <9, 9>, <1, 6>}
Consider the following two SQL queries SQ1 and SQ2 :
SQ1 : SELECT * FROM One)
EXCEPT
(SELECT * FROM Two);
SQ2 : SELECT * FROM One)
EXCEPT ALL
(SELECT * FROM Two);
For each of the SQL queries, what is the cardinality (number of rows) of the result obtained when applied to the instances above ?
A
2 and 1 respectively
B
1 and 2 respectively
C
2 and 2 respectively
D
1 and 1 respectively
Question 11 Explanation: 
EXCEPT operation is like subtraction operation.
EXCEPT : EXCEPT operator do not include duplicates i.e if there are duplicate copies of a tuple in a relation the EXCEPT will consider only one copy of that duplicated tuple.
EXCEPT ALL : EXCEPT operator includes duplicates.


Correct Answer: B
Question 11 Explanation: 
EXCEPT operation is like subtraction operation.
EXCEPT : EXCEPT operator do not include duplicates i.e if there are duplicate copies of a tuple in a relation the EXCEPT will consider only one copy of that duplicated tuple.
EXCEPT ALL : EXCEPT operator includes duplicates.


0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!