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 2018
MCQ (Single Correct Answer)
+2
-0.6
In an Entity-Relationship $$(ER)$$ model, suppose $$R$$ is a many-to-one relationship from entity set $$E1$$ to entity set $$E2.$$ Assume that $$E1$$ and $$E2$$ participate totally in $$R$$ and that the cardinality of $$E1$$ is greater than the cardinality of $$E2$$

Which one of the following is true about $$R$$?

A
Every entity in $$E1$$ is associated with exactly one entity in $$E2.$$
B
Some entity in $$E1$$ is associated with more than one entity in $$E2.$$
C
Every entity in $$E2$$ is associated with exactly one entity in $$E1.$$
D
Every entity in $$E2$$ is associated with at most one entity in $$E1.$$
3
GATE CSE 2018
MCQ (Single Correct Answer)
+2
-0.6
Consider the relations $$r(A, B)$$ and $$s(B, C),$$ where $$s.B$$ is a primary key and $$r.B$$ is a foreign key referencing $$s.B.$$ Consider the query

$$Q:$$ $$\,\,\,\,\,\,\,\,\,$$ $$r$$ $$\,\,\,\,$$ $$\bowtie$$ $$\,\,\,\,$$ $$\left( {{\sigma _{b < 5}}\left( s \right)} \right)$$

Let $$LOJ$$ denote the natural left outer-join operation. Assume that $$r$$ and $$s$$ contain no null values.

Which one of the following queries is NOT equivalent to $$Q$$?

A
$${\sigma _{B < 5}}\left( {r\,\,} \right.$$ $$\bowtie$$ $$\left. {\,\,s} \right)$$
B
$${\sigma _{B < 5}}\left( {r\,\,LOJ\,\,s} \right)$$
C
$$r\,\,LOJ\,\,\left( {{\sigma _{B < 5}}\left( s \right)} \right)$$
D
$${\sigma _{B < 5}}\left( r \right)LOJ\,\,s$$
4
GATE CSE 2018
MCQ (Single Correct Answer)
+2
-0.6
Let $$ \oplus $$ and $$ \odot $$ denote the Exclusive OR and Exclusive NOR operations, respectively.

Which one of the following is NOT CORRECT?

A
$$\overline {P \oplus Q} = P \odot Q$$
B
$$\overline P \oplus Q = P \odot Q$$
C
$$\overline P \oplus \overline Q = P \oplus Q$$
D
$$\left( {P \oplus \overline P } \right) \oplus Q = \left( {P \odot \overline P } \right) \odot \overline Q $$
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12