Consider the following relational schema, and answer the following questions by writing relational algebra queries: Employee (EmpID, City, Zipcode) Works (EmpID, CorpID, Salary) Corporation (CorpID, City) Manages (EmpID, MngrID) a. Find the ID and City of all employees who work for Amawig. b. Find the ID and City of all employees who work for Amawig corporation and earn more than $100,000. c. Find the IDs of all employees who live in the same city as the corporation for which they work. d. Find the ID of all employees who live in the same area (zipcode) as do their managers. e. Find the IDs of all employees who earn more than every employee in the Amawig Corporation. f. Suppose that the corporations may have more than a branch in different cities. Find all corporations located in every city in which Amawig Corporation is located.
- Consider the following relational schema, and answer the following questions by writing relational algebra queries:
Employee (EmpID, City, Zipcode)
Works (EmpID, CorpID, Salary)
Corporation (CorpID, City)
Manages (EmpID, MngrID)
a. Find the ID and City of all employees who work for Amawig.
b. Find the ID and City of all employees who work for Amawig corporation and earn more than $100,000.
c. Find the IDs of all employees who live in the same city as the corporation for which they work.
d. Find the ID of all employees who live in the same area (zipcode) as do their managers.
e. Find the IDs of all employees who earn more than every employee in the Amawig Corporation.
f. Suppose that the corporations may have more than a branch in different cities. Find all corporations located in every city in which Amawig Corporation is located.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps