Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Based on the relational schcma bclow: Emp(eid: integer, ename: string, age: integer, salary: real) Works(cid: integer, did: intcger, pcttime: integer) Dept(did: integer, dname: string, budget:

image text in transcribed

Based on the relational schcma bclow: Emp(eid: integer, ename: string, age: integer, salary: real) Works(cid: integer, did: intcger, pcttime: integer) Dept(did: integer, dname: string, budget: real, managerid: integer) Express the following queries in Rclational Algebra. Please make use of the of the 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 vour assumptions clearly. e plain whx Bo. 0 bduted in clas cn Find the names and salary of cach cmployec 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.) c. For each department with more than 20 full-time-equivalent employees, i.e., the part-time and full-time cmployccs add up to at lcast that many full-time employees), find the did together with the number of employees which work in that department. (Plcase note that a department with cighteen full-time cmployccs and five 50% part-time employees should be included in the result with 23 as the number of employees in the department) d. Find the name, age and salary of the youngest employee 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