Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

All answers shall be typed using a word processor 2. (120) Consider the employee database of Fig. 2, where the primary keys are underlined. Given

All answers shall be typed using a word processor

image text in transcribed

2. (120) Consider the employee database of Fig. 2, where the primary keys are underlined. Given an SQL query for each of the following questions. a. Find the names of all employees who work for First Bank Corporation. b. Find the names and cities of residence of all employees who work for First Bank Corporation. Find the names, street addresses, and cities of residence of all employees who work for First Bank Corporation and earn more than $10,000. d. Find all employees in the database who live in the same cities as the companies for which they work. e. Find all employees in the database who live in the same cities and on the same streets as do their managers. f. Find all employees in the database who do not work for the First Bank Corporation. employee employee-id, employee-name, street, city) works(employee-id, company-id, salary) company(company-id, company-name, city) manages(employee-id, manager-id) Figure 2. Employee database Note: For each tuple of the manages relation, the manager-id is the manager's employee id. 2. (120) Consider the employee database of Fig. 2, where the primary keys are underlined. Given an SQL query for each of the following questions. a. Find the names of all employees who work for First Bank Corporation. b. Find the names and cities of residence of all employees who work for First Bank Corporation. Find the names, street addresses, and cities of residence of all employees who work for First Bank Corporation and earn more than $10,000. d. Find all employees in the database who live in the same cities as the companies for which they work. e. Find all employees in the database who live in the same cities and on the same streets as do their managers. f. Find all employees in the database who do not work for the First Bank Corporation. employee employee-id, employee-name, street, city) works(employee-id, company-id, salary) company(company-id, company-name, city) manages(employee-id, manager-id) Figure 2. Employee database Note: For each tuple of the manages relation, the manager-id is the manager's employee id

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_2

Step: 3

blur-text-image_3

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

Ehs 2.0 Revolutionizing The Future Of Safety With Digital Technology

Authors: Tony Mudd

1st Edition

B0CN69B3HW, 979-8867463663

More Books

Students also viewed these Databases questions

Question

Explain the concept of psychological disengagement.

Answered: 1 week ago

Question

friendliness and sincerity;

Answered: 1 week ago