...
ER-Model
December 11, 2023
GATE 2008
December 11, 2023
ER-Model
December 11, 2023
GATE 2008
December 11, 2023

GATE 2014 [Set-3]

Question 40

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:

empId(employee)-∏empId(employee(empId = eID)∧(empAge ≤ depAge)dependent)

The above query evaluates to the set of empIds of employees whose age is greater than that of

A
some dependent.
B
all dependents.
C
some of his/her dependents.
D
all of his/her dependents.
Question 40 Explanation: 
The inner query selects the employees whose age is less than or equal to at least one of his dependents. So, subtracting from the set of employees, gives employees whose age is greater than all of his dependents.
Correct Answer: D
Question 40 Explanation: 
The inner query selects the employees whose age is less than or equal to at least one of his dependents. So, subtracting from the set of employees, gives employees whose age is greater than all of his dependents.

Leave a Reply

Your email address will not be published. Required fields are marked *