Find the streets and cities of residence of all managers who work for Union Pacific. Find the salaries of all managers who work for First Bank and live in Omaha. Find salaries of employees in the database who live in the same cities as the companies for which they work. Find all employees in the database who live in the same cities and on the same streets as do their managers.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

SQL-programming language

Oracle SQL Devloper-Tool

 

The database schema

Employee (Lastname, FirstName, MidInitial, gender, street, city)

Works (Lastname, FirstName, MidInitial, company-name, salary) company (company-name, city)

company (company-name, city)

Manages(Lastname, FirstName, MidInitial, ManagerLastname, MFirstName, MMidInitial, start-date)

 

Manages(Lastname, FirstName, MidInitial, ManagerLastname, MFirstName, MMidInitial, start-date)

employee_table (you should define three attributes for employee and manager names)

Name                           street          city           gender

--------------------------------------------------------

Anderson, Susan L     108th        Omaha       F

Brady, Dan L               P street     Lincoln       M

Chen, Peter K             124th         Omaha       M

Clemson, Ann M        O              Lincoln      F

Dale, Mary K               132th        Omaha       F

Gill, Mary L                P street      Lincoln       F

Harrison, Susan M      Old Mill          Omaha F

Jackson, Kim A           178th         Omaha     F

Jason, Pat M                 8th             C.Bluffs    M

Kumar, Paul T           Dodge           Omaha     M

Orr, Susanne S          Q               Omaha   F

Peterson, Mike E      Blondo          Omaha     M

Powell, Tom E         Broadway        C.Bluffs  M

Quinn, Jacky M        168st           Omaha     F

Rand, Pam R           13st            Omaha     F

Schreck, Ann P        214st           Elkhorn   F

Simon, Eric K         77th            Lincoln   M

Smith, John A         8th             C.Bluffs  M

Thomson, Ron F        Farnam          Omaha     M

Young, Don R          Dodge           Omaha     M

Wong, Carole S        Broadway        C.Bluffs  F

 

works_table: (Again, you should define three attributes for employee name)

employee_name         company_name      salary

------------------------------------------------

Anderson, Susan L     Mutual of Omaha   48000

Brady, Dan L          FDR               42000

Chen, Peter K             FDR                 53000

Clemson, Ann M        First Bank        39000

Dale, Mary K          Mutual of Omaha   58000

Gill, Mary L                Union Pacific  48700

Harrison, Susan M      Union Pacific  54320 

Jackson, Kim A        FDR               68000

Jason, Pat M          FDR               83000

Kumar, Paul T          FDR               44000

Orr, Susanne S          Lincoln Star      32000

Peterson, Mike E      First Bank        37000

Powell, Tom E         First Bank        54000

Quinn, Jacky M        First Bank        85000

Rand, Pam R           FDR               37000

Schreck, Ann P        First Bank        36000

Simon, Eric K         Mutual of Omaha   45000

Smith, John A         FDR               55000

Thomson, Ron F        First Bank        39000

Young, Don R          Mutual of Omaha   27000

Wong, Carole S         First Bank        44000

 

company_table:

company_name          city

-----------------------------

First Bank                   Omaha

FDR                            Omaha

Lincoln Star                Lincoln

Mutual of Omaha       Omaha

Union Pacific              Omaha

 

Manages (Note: both employee and manager names should include three

attributes):

employee_name         manager_name      start_date

-----------------------------------------------------

Anderson, Susan L     Dale, Mary K      15-SEP-2002

Brady, Dan L          Jason, Pat M      05-MAR-2004

Chen, Peter K            Jason, Pat M      12-JUNE-2003

Clemson, Ann M        Powell, Tom E     30-AUG-2001

Gill, Mary L                Harrison, Susan M      25-JAN-2003

Jackson, Kim A        Jason, Pat M      09-MAY-2008

Kumar, Paul T           Jason, Pat M      09-MAY-2001

Rand, Pam R           Smith, John A     15-JAN-2004

Peterson, Mike E      Powell, Tom E     30-AUG-2006

Schreck, Ann P        Quinn, Jacky M    28-FEB-1996

Simon, Eric K         Anderson, Susan L 22-FEB-2004

Smith, John A         Jason, Pat M      05-MAR-2003

Thomson, Ron F        Powell, Tom E     30-AUG-1998

Wong, Carole S        Quinn, Jacky M    28-FEB-2001   

Young, Don R          Dale, Mary K      15-SEP-2007

 

  1. Find the streets and cities of residence of all managers who work for Union Pacific.
  2. Find the salaries of all managers who work for First Bank and live in Omaha.
  3. Find salaries of employees in the database who live in the same cities as the companies for which they work.
  4. Find all employees in the database who live in the same cities and on the same streets as do their managers.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Database Environment
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education