Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Phone Consider the database for a company named Wedgewood Pacific Corporation (WPC) that contains data about company employees, department projects, company assets, and other aspects

image text in transcribed

Phone Consider the database for a company named Wedgewood Pacific Corporation (WPC) that contains data about company employees, department projects, company assets, and other aspects of company operations. For the following questions, two tables will be considered as provided below: DEPARTMENT (DepartmentName, BudgetCode, OfficeNumber, Phone) EMPLOYEE( EmployeeNumber, FirstName, LastName, Department, Phone, Email) Dapartment Table: Employee Table: EmployeeNumber FirstName LastName Department Email AutoNumber] Mary Jacobs Administration 360-285-8110 Mary JacobsWPC.com [Auto Number] Rosalie Jackson Administration 360-285-8120 Rosalie Jackson WPC.com AutoNumber] Richard Bandalone Legal 360-285-8210 Richard.Bandalone WPC.com [Auto Number] Tom Caruthers Accounting 360-285-8310 Tom.Caruthers WPC.com AutoNumber] Heather Jones Accounting 360-285-8320 Heather Jones@WPC.com [AutoNumber] Mary Abernathy Finance 360-285-9410 Mary Abernathy@WPC.com [Auto Number] George Smith Human Resources 360-285-8510 George Smith@WPC.com [Auto Number) Tom Jackson Production 360-287-8610 Tom. Jackson WPC.com AutoNumber] George Jones Production 360-287-8620 George Jones@WPC.com [AutoNumber] Ken Numoto Marketing 360-287-8710 Ken.NumotoWPC.com [Auto Number] James Nestor Info Systems James. Nestor WPC.com AutoNumber] Rick Brown Info Systems 360-287-8820 Rick.Browne WPC.com DepartmentName BudgetCode OfficeNumber Phone Administration BC-100-10 BLDG01-300 360-285-8100 Legal BC-200-10 BLDG01-200 360-285-8200 Accounting BC-300-10 BLDG01-100 360-285-8300 Finance BC-400-10 BLDG01-140 360-285-8400 Human Resources BC-500-10 BLDG01-180 360-285-8500 Production BC-600-10 BLDG02-100 360-287-8600 Using above tables, create SQL queries to answer the following questions: (10 marks) a. Identify primary and foreign keys for both tables. b. Write insert statements to enter last two records into Department table as shown in above figure. C. Display details of all employees who work in Accounting department. Sort the results in descending order of employee last name. d. Display BudgetCode and OfficeNumber of the department where the employee named 'Heather" works How many employees work in Administration department? Marketing BC-700-10 BLDG02-200 360-287-8700 InfoSystems BC-800-10 BLDG02-270 360-287-8800 e

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

7. What is Tobins q, and what does it have to do with investment?

Answered: 1 week ago