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
WorksFor DeptName, EmpID
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. WorksFor 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 ac below:
a points Retrieve the name of all employees who work in the Marketing
department
b 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
c points Retrieve the name of the employees who earned the most in each
department that has more than employees.
dOptional Extra Credit Express the following SQL statement using both the
relational and domain calculus notations?
SELECT UNIQUEdnumber
FROM departments d employees e worksfor w
WHERE wname dname AND
wEmp
ID eID AND
dname Sales
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
