Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following relational database schema: employee ( employee - name, employee - id , street, e - city ) works ( employee - id
Consider the following relational database schema:
employeeemployeename, employeeid street, ecity
worksemployeeid companyid salary
companycompanyname, companyid ccity
managesemployeeid managerid
Specify the following queries on this database schema using the relational operators we discussed in class. Write your answers on a separate sheet of paper in the order that they are specified below.
Retrieve the name and address of employees who work for First Bank Corporation.
Retrieve the name, street address, and city of residence of all employees who work for Thrifty Industries and earn more than $ per year.
Retrieve the name of all employees who live in the same city as the company for which they work.
Retrieve the name of all employees who live on the same street and in the same city as do their managers.
Retrieve the name of all employees who do not work for First Bank Corporation.
Retrieve the name of all employees who earn more than every employee of Small Bank Corporation.
Assume that companies may be located in several cities Retrieve all companies located in every city in which Thrifty Industries is located.
For each company, find the average salary of employees working for that company.
For each city, find the number of employees who work for at least one company in that city.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started