Question: i need this asap Consider a database schema with three relations: Bmployee (eid:integer, ename:string, age:integer, salary:real) works (eid:integer, did:integer, pct_time:integer) Department (did:integer, dname:string, budget:real, managerid:integer)


Consider a database schema with three relations: Bmployee (eid:integer, ename:string, age:integer, salary:real) works (eid:integer, did:integer, pct_time:integer) Department (did:integer, dname:string, budget:real, managerid:integer) The keys are underlined in each relation. RelationFimployee stores employee information such as unique lentifier eid, employee name ename, age and salary. Relation Department stores the department nique identifier did, department name dname, the department budget and managerid which is the id of the employee who is managing the department. The managerid value can always be found in the id field of a record of the Employee relation. The Works relation tracks which employee works in which epartment, and what percentage of the time s/ he allocates to that department. Note that, an employee an work in several departments. Write relational algebra expressions for the following queries: 1) Find the ages of employees who earn at least $50,000 salary. work at least 30% of their time in a department that has 2) Find the salaries of employees that budget at least $500,000. 3) Find the names of employees who work in the 'Marketing' department or who spend more than half of their time in a single department. (Hint: set union operation) 4) Find the name of departments who employ only persons of age 40 or younger. 5) Bonus: Find the names of employees who work in exactly one department. [5 Points]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
