1
GATE CSE 2012
MCQ (Single Correct Answer)
+2
-0.6
Suppose R1 (A, B) and R2 (C, D) are two relation schemas. Let r1 and r2 be the corresponding relation instances. B is a foreign key that refers to C in R2. If data in r1 and r2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE?
A
$$\prod_{B}(r_{1})- \prod _{C}(r_{2})= \varnothing$$
B
$$\prod_{C}(r_{2})- \prod _{B}(r_{1})= \varnothing$$
C
$$\prod_{B}(r_{1}) = \prod _{C}(r_{2})$$
D
$$\prod_{B}(r_{1}) - \prod _{C}(r_{2}) \neq \varnothing$$
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 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
3
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
4
GATE CSE 2012
MCQ (Single Correct Answer)
+2
-0.6
Consider the following transactions with data items P and Q initialized to zero:
T1 : read (P) ; 
     read (Q) ; 
     if P = 0 then Q : = Q + 1 ; 
     write (Q). 
T2 : read (Q) ; 
     read (P) 
     if Q = 0 then P : = P + 1 ; 
     write (P).
Any non-serial interleaving of T1 and T2 for concurrent execution leads to
A
a serializable schedule
B
a schedule that is not conflict serializable
C
a conflict serializable schedule
D
a schedule for which precedence graph cannot be drawn
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
CBSE
Class 12