Home » Database » Database miscellaneous » Question

Database miscellaneous

  1. Consider the relation employee (name, sex, supervisorName) with name as the key. supervisorName gives the name of the supervisor of the employee under consideration. What does the following tuple relational calculus query produce?
    {e.name | employee (e) ∧}
    (∀ x) [ ̚ employee (x) ∨ x. supervisor Name ≠ e. name vx. sex = “male”]
    1. Names of employees with a male supervisor
    2. Names of employees with no immediate male subordinates
    3. Names of employees with no immediate female subordinates
    4. Names of employees with a female supervisor
Correct Option: C

We are given with the below relational calculus:
{e.name|employee (e) ∧}
(∀x)[ ̚ employee (x) ∨ x.x.supervisorName ≠ x.sex = “male” ]}
{e.name|employee (e) ∧} gives he name of the employee
(∀x)[ ̚ employee (x)j v x.supervisorName ≠ x.sex = “male” ]} tells that employee does not have nay female subordinate.



Your comments will be displayed only after manual approval.