Home » Database » Database miscellaneous » Question

Database miscellaneous

  1. 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|X| (empId = eID)^.(empAge. depAge)dependent)
    The above query evaluates to the set of empIds of employees whose age is greater than that of
    1. some dependent.
    2. all dependents.
    3. some of his/her dependents.
    4. all of his/her dependents.
Correct Option: D


A gives the set of empIds of those employees whose age is less than or equal to the age of some of his/her dependents. Set of empIds of all employees - set of empIds obtained from part A gives the set of empIds of employees whose age is greater than that of all of his/ her dependents.



Your comments will be displayed only after manual approval.