Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

i need this asap image text in transcribed
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions