1
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
Let R and S be two relations with the following schema

R (P, Q, R1, R2, R3)

S (P, Q, S1, S2)

Where {P, Q} is the key for both schemas. Which of the following queries are equivalent?
I. $$\Pi_P \left(R \bowtie S\right)$$
II. $$\Pi_P \left(R\right) \bowtie \Pi_P\left(S\right)$$
III. $$\Pi_P \left(\Pi_{P, Q} \left(R\right) \cap \Pi_{P,Q} \left(S\right) \right)$$
IV. $$\Pi_P \left(\Pi_{P, Q} \left(R\right) - \left(\Pi_{P,Q} \left(R\right) - \Pi_{P,Q} \left(S\right)\right)\right)$$
A
Only I and II
B
Only I and III
C
Only I, II and III
D
Only I, III and IV
2
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
Consider the following relation schemas :

b-Schema = (b-name, b-city, assets)
a-Schema = (a-num, b-name, bal)
d-Schema = (c-name, a-number)

Let branch, account and depositor be respectively instances of the above schemas. Assume that account and depositor relations are much bigger than the branch relation.

Consider the following query:
Пc-nameb-city = “Agra” ⋀ bal < 0 (branch $$ \Join $$ (account $$ \Join $$ depositor))

Which one of the following queries is the most efficient version of the above query ?

A
Пc-namebal < 0b-city = “Agra” branch $$ \Join $$ account) $$ \Join $$ depositor)
B
Пc-nameb-city = “Agra”branch $$ \Join $$ (σbal < 0 account $$ \Join $$ depositor))
C
Пc-nameb-city = “Agra” branch $$ \Join $$ σb-city = “Agra” ⋀ bal < 0 account) $$ \Join $$ depositor)
D
Пc-nameb-city = “Agra” ⋀ bal < 0 account $$ \Join $$ depositor))
3
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6

Consider the relation employee(name, sex, supervisorName) with name as the key, supervisorName gives the name of the supervisor of the employee under consideration. What does the following Tuple Relational Calculus query produce?

$$\eqalign{ & \{ e.name\,|\,employee(e) \wedge \cr & (\forall x)[\neg employee(x) \vee \cr & x.\sup ervisorName \ne e.name\, \vee \cr & x.sex = 'male']\} \cr} $$
A
Names of employees with a male supervisor.
B
Names of employees with no immediate male subordinates.
C
Names of employees with no immediate female subordinates.
D
Names of employees with a female supervisor.
4
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
Consider a selection of the form σA ≤ 100(r), where r is a relation with 1000 tuples. Assume that the attribute values for A among the tuples are uniformly distributed in the interval [ 0, 500 ]. Which one of the following options is the best estimate of the number of tuples returned by the given selection query?
A
50
B
100
C
150
D
200
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12