1
GATE CSE 2006
+2
-0.6

Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are Did and cid respectively and the records are stored in ascending order of these primary keys as given in the tables. No indexing is available in the database.

D: Drivers Relation

Did Dname rating Age
22 Karthikeyan 7 25
29 Salman 1 33
31 Boris 8 55
32 Amoldt 8 25
58 Schumacher 10 35
64 Sachin 7 35
71 Senna 10 16
74 Sachin 9 35
85 Rahul 3 25
95 Ralph 3 53

R: Reserves Relation

Did cid Day
22 101 10/10/06
22 102 10/10/06
22 103 8/10/06
22 104 7/10/06
31 102 10/11/06
31 103 6/11/06
31 104 12/11/06
64 101 5/9/06
64 102 8/9/06
74 103 8/9/06

C: Cars relation

cid Cname Color
101 Renault
Blue
102 Renault
Red
103 Ferrari Green
104 Jaguar Red

What is the output of the following SQL query?

Select D.dname
From Drivers D
Where D.did in (SELECT R.did
From Cars C,Reserves R
WHERE R.cid = C.cid and C.color = 'green')
A
Karthikeyan, Boris
B
Sachin, Salman
C
Karthikeyan, Boris, Sachin
D
Schumacher, Seena
2
GATE CSE 2006
+1
-0.3
Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R respectively. The relation r1 contains 2000 tuples and r2 contains 2500 tuples. The maximum size of the join $${r_1} \Join {r_2}$$ is
A
2000
B
2500
C
4500
D
5000
3
GATE CSE 2006
+1
-0.3
Which of the following relational query languages have the same expressive power?

I) Relational algebra
II) Tuple relational calculus restricted to safe expressions
III) Domain relational calculus restricted to safe expressions

A
II and III only
B
I and II only
C
I and III only
D
I, II and III
4
GATE CSE 2006
+2
-0.6
Consider a Boolean function $$f(w, x, y, z).$$ Suppose that exactly one of its inputs is allowed to change at a time. If the function happens to be true for two input vectors $${i_1} = < {w_1},{x_1},{y_1},{z_1} >$$ and $${i_2} = < {w_2},{x_2},{y_2},{z_2} > ,$$ we would like the function to remain true as the input changes from $${i_1}$$ to $${i_2}$$ ($${i_1}$$ and $${i_2}$$ differ in exactly one bit position), without becoming false momentarily. Let $$f\left( {w,x,y,z} \right) = \sum {\left( {5,7,11,12,13,15} \right)} .$$ Which of the following cube covers of $$f$$ will entire that the required property is satisfied?
A
$$\overline w xz,\,wx\overline y ,\,x\overline y z,\,xyz,wyz$$
B
$$wxy,\,\overline w xz,\,wyz$$
C
$$wx\overline {yz} ,\,xz,\,w\overline x yz$$
D
$$wzy,\,wyz,\,wxz,\,\overline w xz,\,x\overline y z,\,xyz$$
GATE CSE Papers
2023
2022
2020
2019
2018
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
EXAM MAP
Medical
NEET
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
CBSE
Class 12