Consider the following relational database:
employee (person_name, street, city)
works (person_name, company_name, salary)
company (company_name, city)
manages(person_name, manager_name)
Write the following queries in relational algebra.
[20 points] Use natural join to find names of employees who
work for a company located in the city "Springfield". Schema of the
output should be (person_name, company_name).
[20 points] Find number of employees managed by each manager.
Rename the count as numManaged. I.e., schema of the output should
be (manager_name, numManaged). Use the assignment operator to store
the result in a relation with the name r.
[20 points] Use the relation r that you found in the previous
question to find names of managers who manage at least 10
employees.
[20 points] Find person_name of the employee(s) who earns the
highest salary. Make sure to use an aggregate function to help you
answer this question.
[20 points] Assume that a company can be located in several
cities (remark: this will imply that company_name is no longer
primary key for company.) Find company_name for companies that are
located in every city where the company "Fedco" is located.