Question: Consider a relational database with the following relations: Managers ( Name , Dep ) Departments ( Name , Location, Manager ) Works - For (

Consider a relational database with the following relations:
Managers (Name, Dep)
Departments (Name, Location, Manager)
Works-For (Dept_Name, Emp_ID)
Employees (ID, Name, Salary)
Here, Managers contains a tuple for each manager, recording its name and the
department managed. Departments contains a tuple for each department, recording
its name and location. Employees records the ID, name, and Salary of the
employees. Works-For keeps track of the relationship between Departments and
Employees.
Please provide tuple relational calculus and domain relational calculus queries for
the queries stated in English in questions 10a-10c below:
10a.(2 points) Retrieve the name of all employees who work in the Marketing
department.7
10b.(2 points) Retrieve the name of the manager along with the number of
employees who manage and work respectively in the Engineering
department in ascending order of employee ID.
10c.(2 points) Retrieve the name of the employee(s) who earned the most in each
department that has more than 50 employees.
10d.(Optional Extra Credit) Express the following SQL statement using both the
relational and domain calculus notations?
SELECT UNIQUE(d.number)
FROM departments d, employees e, works_for w
WHERE w.name = d.name AND
w.Emp
_
ID = e.ID AND
d.name =Sales

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!