Deprecated: Implicit conversion from float-string "1705800054.901" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1705800054.901" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1705800054.901" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1705800054.901" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1705800054.901" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1705975824.891" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1705975824.891" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1705975824.891" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1705975824.891" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1705975824.891" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1706006938.132" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1706006938.132" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1706006938.132" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1706006938.132" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1706006938.132" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1706290598.971" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1706290598.971" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1706290598.971" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1706290598.971" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1706290598.971" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1706291025.006" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1706291025.006" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1706291025.006" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1706291025.006" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1706291025.006" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1706325903.784" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1706325903.784" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1706325903.784" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1706325903.784" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1706325903.784" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1705800055.266" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1705800055.266" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1705800055.266" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1705800055.266" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1705800055.266" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
Databases: GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 25
retagged by
725 views
12 votes
12 votes

Let $\mathrm{R}(\mathrm{a}, \mathrm{b})$ be a schema and $\mathrm{Q} 1$ and $\mathrm{Q} 2$ are queries on $\mathrm{R}$.

Q1: SELECT * FROM R;
Q2: (SELECT * FROM R) INTERSECT (SELECT * FROM R);

Which of the following statements is true?

  1. $\text{Q1}$ and $\text{Q2}$ produce the same answer.
  2. The answer to $\text{Q1}$ is always contained in the answer to $\text{Q2}.$
  3. The answer to $\text{Q2}$ is always contained in the answer to $\text{Q1}.$
  4. $\text{Q1}$ and $\text{Q2}$ produce different answers.
retagged by

1 Answer

15 votes
15 votes
The intersection is a set operation and set doesnt contain duplicate values. $\text{Q1}$ will print all the rows including those which are duplicates i.e there may be some rows in its output that might be repeated. In $\text{Q2}$ duplicate rows are printed only once i.e there will be no repetition. $\text{Q2} \leq \text{Q1}$ and hence result of $\text{Q2}$ will always be contained in $\text{Q1}$.

If it would have been INTERSECT ALL then the answer would have been (A).
edited by
Answer:

Related questions


Deprecated: Implicit conversion from float-string "1705800056.532" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1705800056.532" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1705800056.532" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1705800056.532" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1705800055.377" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1705800055.377" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1705800055.377" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1705800055.377" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1705800010.671" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1705800010.671" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1705800010.671" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1705800010.671" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1705800089.802" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1705800089.802" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1705800089.802" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1705800089.802" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803
426
views
2 answers
3 votes
GO Classes asked Jan 21
426 views
An attribute $A$ is called prime if $A$ is in any of the candidate keys. Assume in the following statements, $\mathrm{A}$ is an attribute $\&\;\mathcal{X}$ is a set of at...
705
views
0 answers
3 votes
GO Classes asked Jan 21
705 views
Assume that a data file has an index consisting of $\text{N}$ items, where $\text{N}$ is large. If a binary search of the index is used to find an item, then, of the foll...
807
views
2 answers
8 votes
GO Classes asked Jan 21
807 views
Consider the following partial schedule for several data items for transactions $T_i$ with timestamp $i:$ How many transactions are Aborted by the timestamp scheduler?
876
views
1 answers
11 votes
GO Classes asked Jan 21
876 views
Consider the two statements regarding the Huffman's algorithm -$\text{S1:}$ The character with the highest probability (all probabilities are unique) is guaranteed to be ...