Question: Consider the following relational schema. An employee can work in more than one department; the pct_time field of the Works relation shows the percentage of
Consider the following relational schema. An employee can work in more than one department; the pct_time field of the Works relation shows the percentage of time that a given employee works in a given department. Emp(eid: integer, name: string, age: integer, salary: real) Works(eid: integer, did: integer, pct_time: integer) Dept(did: integer, dname: string, budget: real, managerid: integer) Write the following queries in relational algebra: 1) Find the eids of the employees who work in the Software department. 2) Find the eids of the employees who work in the Software department and have an age of 30. 3) Find the eids of the employees who do not work in the Software department. 4) Find the name and salary of each employee who works in the Hardware department or the Software department. 5) Find the name and salary of each employee who works in both the Hardware department and the Software department. 6) Find the eids of the employees who has the highest salary 7) Find the managerid of the managers who manage only the departments with budgets between 1 million and 2 million. 8) Find the names of the employees who work in all departments. 9) Find the eids of the employees who work in all the departments with budgets greater than 2 million.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
