1
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
2
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 relational algebra expression contain? Assume that the schema of A ∪ B is the same as that of A. $$(A\cup B)\bowtie _{A.Id > 40 \vee C.Id < 15} C$$

A
7
B
4
C
5
D
9
3
GATE CSE 2011
MCQ (Single Correct Answer)
+2
-0.6
Consider a relational table r with sufficient number of records, having attributes A1, A2,....., An and let 1 $$ \le $$ p $$ \le $$ n. Two queries Q1 and Q2 are given below.

$$Q1: \pi_{A_1, \dots ,A_p} \left(\sigma_{A_p=c}\left(r\right)\right)$$ where is a constant

$$Q2: \pi_{A_1, \dots ,A_p} \left(\sigma_{c_1 \leq A_p \leq c_2}\left(r\right)\right)$$ where c1 and c2 are constants

The database can be configured to do ordered indexing on Ap or hashing on Ap. Which of the following statements is TRUE?

A
Ordered indexing will always outperform hashing for both queries
B
Hashing will always outperform ordered indexing for both queries
C
Hashing will outperform ordered indexing on Q1, but not on Q2
D
Hashing will outperform ordered indexing on Q2, but not on Q1
4
GATE CSE 2010
MCQ (Single Correct Answer)
+2
-0.6
The following functional dependencies hold for relations R(A, B, C) and S(B, D, E): $$$\eqalign{ & B \to A \cr & A \to C \cr} $$$

The relation R contains 200 tuples and the relation S contains 100 tuples. What is the maximum number of tuples possible in the natural join R $$\Join$$ S?

A
100
B
200
C
300
D
2000
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