Question 10831 – APPSC-2016-DL-CS
March 19, 2024Waterfall-model
March 19, 2024UGC 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 ?
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 ?
2 and 1 respectively | |
1 and 2 respectively | |
2 and 2 respectively | |
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.
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.
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.
Subscribe
Login
0 Comments