Question: Given the following relational schema for an employee database system: employee ( e - id , e - name, rank, e - dept, e -

Given the following relational schema for an employee database
system:
employee(e-id, e-name, rank, e-dept, e-city)
rank is a foreign key to paying
project(p-id, p-name, p-dept, budget, p-city)
works(e-id, p-id, duty, since)
e-id is a foreign key to employee, p-id is a foreign key to project
paying(rank, salary)
ANSWER THE QUESTION:
(a) Find the employees (e-id and e-name) from the Construction department who are working
in Ankara projects with a budget higher than 1 Million TL.
(b) Find the employees (e-id and e-name) with a rank higher than 5 and are working in the
projects located in their cities.
(c) Find the employees (e-id and e-name) from the Construction department who are working
in all the projects from Istanbul.
(d) Find the employees (e-id and e-name) from Ankara who are working as Technician since
2020 and have a salary higher than 100,000 TL.
(e) Find the projects (p-id and p-name) from Istanbul with all its employees having a salary
higher than 100,000 TL.
(f) Find the salary of the employees with the highest rank.
(g) For each city, find the number of projects together with the total budget over all the
projects in that city.
(h) Find the number of employees from Ankara for each rank who are working in the projects
with a budget higher than 1 Million TL .
(i) Find the projects (p-id and p-name) from Istanbul with budgets that are higher than the
budgets of all the projects from Ankara.
(j) Find the projects (p-id and p-name) from Ankara with budgets that are at least twice the
total sum of the salaries paid to their employees.
(k) Find the employees and their salaries (e-id and salary) who are working in the Ankara
project with the highest budget.

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 Databases Questions!