1
GATE CSE 2014 Set 3
MCQ (Single Correct Answer)
+2
-0.6
Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation:
employee (empId, empName, empAge)
dependent (depId, eId, depName, depAge)
Consider the following relational algebra query: $$\Pi_{empId}\:(employee) - \Pi_{empId}\:(employee \bowtie_{(empId=eID) \wedge (empAge \leq depAge)} dependent)$$The above query evaluates to the set of empIds of employees whose age is greater than that of
2
GATE CSE 2012
MCQ (Single Correct Answer)
+2
-0.6
Consider the following relations A, B and C:
A
B
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')
3
GATE CSE 2012
MCQ (Single Correct Answer)
+2
-0.6
Consider the following relations A, B and C:
A
B
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$$
4
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?
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 2 (1)
GATE CSE 2014 Set 3 (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