Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

employee (employee-name, employee-id, street, e-city) works (employee-id, company-id, salary) company (company-name, company-id, c-city) manages (employee-id, manager-id) Specify the following queries on this database schema using

employee(employee-name, employee-id, street, e-city)

works(employee-id, company-id, salary)

company(company-name, company-id, c-city)

manages(employee-id, manager-id)

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.

  1. Retrieve the name and address of employees who work for First Bank Corporation.

  1. Retrieve the name, street address, and city of residence of all employees who work for Thrifty Industries and earn more than $10,000 per year.

  1. Retrieve the name of all employees who live in the same city as the company for which they work.

  1. Retrieve the name of all employees who live on the same street and in the same city as do their managers.

  1. Retrieve the name of all employees who do not work for First Bank Corporation.

  1. Retrieve the name of all employees who earn more than every employee of Small Bank Corporation.

  1. (Assume that companies may be located in several cities) Retrieve all companies located in every city in which Thrifty Industries is located.

  1. For each company, find the average salary of employees working for that company.

  1. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions