1
GATE CSE 2018
MCQ (Single Correct Answer)
+1
-0.3
Consider the following two tables and four queries in SQL.
Book (isbn, bname), Stock (isbn, copies)
Query 1:
SELECT B.isbn, S.copies
 FROM Book B INNER JOIN Stock S
 ON B.isbn = S.isbn;

Query 2:
SELECT B.isbn, S.copies
 FROM Book B LEFT OUTER JOIN Stock S
 ON B.isbn = S.isbn;
Query 3:
SELECT B.isbn, S.copies
 FROM Book B RIGHT OUTER JOIN Stock S
 ON B.isbn = S.isbn;
Query 4:
SELECT B.isbn, S.copies
 FROM Book B FULL OUTER JOIN Stock S
 ON B.isbn = S.isbn;
Which one of the queries above is certain to have an output that is a superset of the outputs of the other three queries?
A
Query 1
B
Query 2
C
Query 3
D
Query 4
2
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+1
-0.3
SELECT operation in SQL is equivalent to
A
the selection operation in relational algebra
B
the selection operation in relational algebra, except that SELECT in SQL retains duplicates
C
the projection operation in relational algebra
D
the projection operation in relational algebra, except that SELECT in SQL retains duplicates
3
GATE CSE 2015 Set 3
MCQ (Single Correct Answer)
+1
-0.3
Consider the following relation
$$\,\,\,\,\,\,\,\,$$ Cinema(theater, address, capacity)
Which of the following options will be needed at the end of the $$SQL$$ query

$$\,\,\,\,\,\,\,\,$$ SELECT $$P1.$$address
$$\,\,\,\,\,\,\,\,$$ FROM Cinema $$P1$$

such that it always finds the addresses of theaters with maximum capacity?

A
WHERE $$P1$$.capacity >= All (select $$P2$$.capacity from Cinema $$P2$$)
B
WHERE $$P1$$.capacity >= Any (select $$P2$$.capacity from Cinema $$P2$$)
C
WHERE $$P1$$.capacity > All (select max($$P2$$.capacity) from Cinema $$P2$$)
D
WHERE $$P1$$.capacity > Any (select max($$P2$$.capacity) from Cinema $$P2$$)
4
GATE CSE 2014 Set 1
MCQ (Single Correct Answer)
+1
-0.3
Given the following statements:

S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL.

S2: Given the table R(a,b,c) where a and b together form the primary key, the following is a valid table definition.

CREATE TABLE S (
 a INTEGER,
 d INTEGER,
 e INTEGER,
 PRIMARY KEY (d),
 FOREIGN KEY (a) references R)

Which one of the following statements is CORRECT?

A
S1 is TRUE and S2 is FALSE.
B
Both S1 and S2 are TRUE.
C
S1 is FALSE and S2 is TRUE.
D
Both S1 and S2 are FALSE.
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12