Question
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):
- 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 |
- Statements that add the following two Contacts to the Contact table (there are two statements):
ContactID | CompanyID | FirstName | LastName | Street | City | State | Zip | IsMain | | 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 |
- Statements that add the following two Employees to the Employee table (there are two statements):
EmployeeID | FirstName | LastName | Salary | HireDate | JobTitle | | 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 |
- 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 |
- In the Employee table, the statement that changes Lesley Blands phone number to 215-555-8800 (one statement).
- In the Company table, the statement that changes the name of Urban Outfitters, Inc. to Urban Outfitters (one statement).
- In ContactEmployee table, the statement that removes Dianne Connors contact event with Jack Lee (one statement).
- 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started