1
GATE CSE 2015 Set 2
MCQ (Single Correct Answer)
+2
-0.6
Consider two relations $${R_1}\left( {A,B} \right)$$ with the tuples $$(1,5), (3,7)$$ and $${R_2}\left( {A,C} \right) = \left( {1,7} \right),\left( {4,9} \right).$$
Assume that $$R(A,B,C)$$ is the full natural outer join of $${R_1}$$ and $${R_2}$$. Consider the following tuples of the form $$(A,B,C): a = (1,5,null),$$ $$b = (1,null,7),$$ $$c = (3, null, 9),$$ $$d = (4,7,null),$$ $$e = (1,5,7),$$ $$f = (3,7,null),$$ $$g = (4,null,9).$$ Which one of the following statements is correct?
A
$$R$$ contains $$a, b, e, f, g$$ but not $$c, d.$$
B
$$R$$ contains all of $$a, b, c, d, e, f, g.$$
C
$$R$$ contains $$e, f, g$$ but not $$a, b.$$
D
$$R$$ contains $$e$$ but not $$f, g.$$
2
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+2
-0.6
Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation:

employee (empId, empName, empAge)

dependent (depId, eId, depName, depAge)

Consider the following relational algebra query: $$\Pi_{empId}\:(employee) - \Pi_{empId}\:(employee \bowtie_{(empId=eID) \wedge (empAge \leq depAge)} dependent)$$

The above query evaluates to the set of empIds of employees whose age is greater than that of

A
some dependent.
B
all dependents.
C
some of his/her dependents.
D
all of his/her dependents.
3
GATE CSE 2014 Set 2
MCQ (Single Correct Answer)
+2
-0.6
Consider a join (relation algebra) between relations r(R)and s(S) using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size(r(R)) < size(s(S)), the join will have fewer number of disk block accesses if
A
relation r(R) is in the outer loop.
B
relation s(S) is in the outer loop.
C
join selection factor between r(R) and s(S) is more than 0.5.
D
join selection factor between r(R) and s(S) is less than 0.5.
4
GATE CSE 2012
MCQ (Single Correct Answer)
+2
-0.6
Consider the following relations A, B and C:
A
ID Name Age
12 Arun 60
15 Shreya 24
99 Rohit 11

B
ID Name Age
15 Shreya 24
25 Hari 40
98 Rohit 20
99 Rohit 11

C
ID Phone Area
10 2200 02
99 2100 01

How many tuples does the result of the following SQL query contain?

SELECT A.Id 
FROM A 
WHERE A.Age > ALL (SELECT B.Age 
                   FROM B 
                   WHERE B.Name = 'Arun')
A
4
B
3
C
0
D
1
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