1
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?
2
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
Information about a collection of students is given by the relation studInfo(studId, name, sex). The relation enroll(studId, courseId) gives which student has enrolled for (or taken) what course(s). Assume that every course is taken by at least one male and at least one female student. What does the following relational algebra expression represent?
$$\eqalign{ & \prod\nolimits_{courseId} {((\prod\nolimits_{studId} {({\sigma _{sex = 'female'}}} } \cr & (studInfo)) \times \prod\nolimits_{courseId} {(enroll)) - enroll)} \cr} $$3
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
4
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).
Questions Asked from Relational Algebra (Marks 2)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE 2024 Set 2 (1)
GATE CSE 2019 (1)
GATE CSE 2018 (1)
GATE CSE 2015 Set 2 (1)
GATE CSE 2014 Set 3 (1)
GATE CSE 2014 Set 2 (1)
GATE CSE 2012 (3)
GATE CSE 2011 (1)
GATE CSE 2010 (1)
GATE CSE 2008 (1)
GATE CSE 2007 (4)
GATE CSE 2005 (1)
GATE CSE 2004 (1)
GATE CSE 2001 (1)
GATE CSE 1998 (1)
GATE CSE 1996 (1)
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages