Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Based on the relational schema below: Emp(eid: integer, ename: string, age: integer, salary: real) Works(eid: integer, did: integer, pcttime: integer) Dept(did: integer, dname: string, budget:

image text in transcribed

Based on the relational schema below: Emp(eid: integer, ename: string, age: integer, salary: real) Works(eid: integer, did: integer, pcttime: integer) Dept(did: integer, dname: string, budget: real, managerid: integer) Express the following queries in Relational Algebra. Please make use of the relational algebra operators that was introduced in class (including aggregation and grouping operators). If you believe you cannot express a given query in relational algebra, explain why not. Or if you end up making some additional assumptions in order to express the queries using relational algebra, please state your assumptions clearly Find the names and salary of each employee who works in both the Sales Department and the Engineering department (assume that Sales Dept ID -101 and Engineering Dept ID-201) a. b. Find the mamagerids of managers who manage only departments with budgets greater than $2,000,000. (Please note that if a manager manages Dept 1 and Dept 2, while Dept 1 has a budget of 1,000,000 and Dept 2 has a budget of 5,000,000, then this manager would not be included in the result list.) For each department with more than 20 full-time-equivalent employees, i.e., the part-time and full-time employees add up to at least that many full-time employees), find the did together with the number of employees which work in that department. (Please note that a department with eighteen full-time employees and five 50% part-time employees should be included in the result with 23 as the number of employees in the department) c. d. Find the name, age and salary of the voungest emplovee in each department. e. Find the department(s) with the highest average salary of employees

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions