1
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
A table ‘student’ with schema (roll, name, hostel, marks), and another table ‘hobby’ with schema (roll, hobbyname) contains records as shown below:

Table: student

Roll Name Hostel Marks
1798 Manoj Rathod 7 95
2154 Soumic Banerjee 5 68
2369 Gumma Reddy 7 86
2581 Pradeep Pendse 6 92
2643 Suhas Kulkarni 5 78
2711 Nitin Kadam 8 72
2872 Kiran Vora 5 92
2926 Manoj Kunkalikar
5 94
2959 Hemant Karkhanis
7 88
3125 Rajesh Doshi 5 82

Table: hobby

Roll Hobbyname
1798 chess
1798 music
2154 music
2369 swimming
2581 cricket
2643 chess
2643 hockey
2711 volleyball
2872 football
2926 cricket
2959 photography
3125 music
3125 chess

The following SQL query is executed on the above tables:

Select hostel
From student natural join hobby
Where marks > = 75 and roll between 2000 and 3000;

Relations S and H with the same schema as those of these two tables respectively contain the same information as tuples. A new relation S’ is obtained by the following relational algebra operation:

$$\eqalign{ & S' = \prod\nolimits_{hostel} {(({\sigma _{S.roll = H.roll}}} \cr & ({\sigma _{marks > 75\,\,\,and\,\,roll > 2000\,\,and\,\,roll < 3000}}(S))X(H)) \cr} $$

The difference between the number of rows output by the SQL statement and the number of tuples in S’ is

A
6
B
4
C
2
D
0
2
GATE CSE 2004
MCQ (Single Correct Answer)
+2
-0.6
Consider the relation Student (name, sex, marks), where the primary key is shown underlined, pertaining to students in a class that has at least one boy and one girl. What does the following relational algebra expression produce? (Note: ρ is the rename operator). GATE CSE 2004 Database Management System - Relational Algebra Question 19 English
A
names of girl students with the highest marks
B
names of girl students with more marks than some boy student
C
names of girl students with marks not less than some boy student
D
names of girl students with more marks than all the boy students
3
GATE CSE 2001
MCQ (Single Correct Answer)
+2
-0.6
Which of the following relational calculus expressions is not safe?
A
$$\left\{t \mid \exists u \in R_1\left(t[A] = u[A]\right) \land \neg \exists s \in R_2 \left(t[A] = s[A]\right)\right\}$$
B
$$\left\{ t \mid \forall u \in R_1\left(u[A]="x"\Rightarrow \exists s \in R_2\left(t[A] = s[A] \land s[A] = u[A]\right)\right) \right\}$$
C
$$\left\{t \mid \neg (t \in R_1)\right\}$$
D
$$\left\{t \mid \exists u \in R_1\left(t[A]=u[A]\right) \land \exists s \in R_2 \left(t[A] = s[A]\right)\right\}$$
4
GATE CSE 1998
MCQ (Single Correct Answer)
+2
-0.6
Which of the following query transformations (i.e. replacing the l.h.s. expression by the r.h.s. expression) is incorrect? R1 and R2 are relations, C1, C2 are selection conditions and A1, A2 are attributes of R1?
A
$$\sigma_{C_1} \left(\sigma_{C_2}\left(R_1\right)\right) \to \sigma_{C_2} \left(\sigma_{C_1}\left(R_1\right)\right)$$
B
$$\sigma_{C_1} \left(\pi_{A_1}\left(R_1\right)\right) \to \pi_{A_1} \left(\sigma_{C_1}\left(R_1\right)\right)$$
C
$$\sigma_{C_1} \left(R_1 \cup R_2\right) \to \sigma_{C_1}\left(R_1\right) \cup \sigma_{C_1} \left(R_2\right)$$
D
$$\pi_{A_1} \left(\sigma_{C_1}\left(R_1\right)\right) \to \sigma_{C_1} \left(\pi_{A_1}\left(R_1\right)\right)$$
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