Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL: The schema name should be mxxws , where mxx is your MySQL user name. To refresh your memory here is the schema for that

SQL:

The schema name should be mxxws, where mxx is your MySQL user name. To refresh your memory here is the schema for that database:

Create the rest of the contact management database by writing the statements that do each of the following items below. For each one: (1) execute them on your copy of the database, and (2) write the statements in the space:

Statement to create the Contact table (one statement)

Statement to create the Employee table (one statement)

Statement to create the ContactEmployee table (one statement):

  1. Statements that add the following two Companies to the Company table (there are two statements):

CompanyID

CompanyName

Street

City

State

Zip

110

Urban Outfitters, Inc.

5000 South Broad St.

Philadelphia

PA

19112

111

Toll Brothers

250 Gibraltar Rd.

Horsham

PA

19044

  1. Statements that add the following two Contacts to the Contact table (there are two statements):

ContactID

CompanyID

FirstName

LastName

Street

City

State

Zip

IsMain

Email

Phone

501

110

Jack

Lee

4777 Cameron Rd.

Buffalo

NY

14209

1

jlee@urbanout.com

215-454-5500

502

111

Bonnie

Johnson

3600 Elk City Rd.

Ridley Park

PA

19078

1

bj@tollbrothers.com

215-938-8000

  1. Statements that add the following two Employees to the Employee table (there are two statements):

EmployeeID

FirstName

LastName

Salary

HireDate

JobTitle

Email

Phone

1001

Dianne

Connor

85,000

August 12, 2011

Sales Manager

dconnor@marketco.com

215-555-5679

1002

Lesley

Bloom

70,000

July 1, 2012

Sales Representative

lbloom@marketco.com

215-555-5678

  1. Statements that record the following contact events in the Contact-Employee table. Remember, a contact event occurs when an employee of MarketCo communicates with one of its customers (contact). MarketCo wants to keep track all contact between its own employees and its clients.

Contact: Bonnie Johnson Employee: Lesley Bloom Date: February 5, 2018 Description: Emailed new marketing plan for approval

Contact: Jack Lee Employee: Dianne Connor Date: February 8, 2018 Description: Phone call to discuss pricing for advertising

  1. In the Employee table, the statement that changes Lesley Blands phone number to 215-555-8800 (one statement).
  2. In the Company table, the statement that changes the name of Urban Outfitters, Inc. to Urban Outfitters (one statement).
  3. In ContactEmployee table, the statement that removes Dianne Connors contact event with Jack Lee (one statement).
  4. Write the SQL SELECT query that displays the names of the employees that have contacted Toll Brothers (one statement). Run the SQL SELECT query in MySQL Workbench. Copy the results below as well.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions