Question: DAD 2 2 0 Project One Complete the steps below to create three tables named Customers, Orders, and RMA, in the QuantigrationUpdates database. Specifically, you

DAD 220 Project One
Complete the steps below to create three tables named Customers, Orders, and RMA, in the QuantigrationUpdates database. Specifically, you must address the following rubric criteria:
1. In your online IDE (Codio), create a database schema called QuantigrationUpdates that will hold tables by using SQL commands.
a. List out the database name on the screen.
b. Provide the SQL commands you ran against MySQL to complete this step.
2. Connect to the QuantigrationUpdates schema. Using the ERD as a reference, write SQL commands to create the following tables with the appropriate attributes and keys to demonstrate relationships based on the ERD:
A. A table named Customers to store customer information with a primary key of Customer ID
B. A table named Orders to store order information with a primary key of Order ID and a foreign key of Customer ID
C. A table named RMA to store RMA information with a primary key of RMA ID and a foreign key of Order ID
Stop: Save your work before moving on to Step Two of this process. You'll continue to work in Codio and use the documentation you started in Step One.
Step Two: Scenario
Now it's time to populate the database with records and run some basic queries against the tables. You will be using the QuantigrationUpdates database and the three tables you created in Step One to do the following tasks:
- Import data from the CSV data files into the three tables.
- Use the \(\backslash r \backslash n \) line terminators to import the CSV file into the MySQL table.
- Do not use IGNORE 1 LINES for data that does not have column headers in the first row.
- Perform queries against the tables.
- Create an output listing to the screen of the query results. Step Two: Directions
Load and Query the Data
In Step One, you set up a customer RMA database using SQL to create tables and placed your work in the Project One Template. In this step, continue to place your work in the Project One Template as you follow the directions below.
The three data files you will use for this project are preloaded into Codio:
- RMA.csv
- Customers.csv
- Orders.csv
Specifically, you must address the following rubric criteria:
1. Import the data from each file into tables.
A. Use the QuantigrationUpdates database, the three tables you created, and the three CSV files preloaded into Codio.
B. Use the import utility of your database program to load the data from each file into the table of the same name. You'll perform this step three times, once for each table.
C. Provide the SQL commands you ran against MySQL to complete this step.
2. Write basic queries against the imported tables to organize and analyze the targeted data. For each query, include a screenshot of the query and its output. Also, include a one- to three-sentence description of the output.
A. Write a SQL query that returns the count of orders for customers located only in Framingham, Massachusetts.
i. This query will use a table join between the Customers and Orders tables. The query will also use a WHERE clause.
ii. Record an answer to the following question: How many records were returned?
B. Write a SQL query to select all of the customers located in Massachusetts.
i. Use a WHERE clause to limit the number of records in the customers table to only those who are located in Massachusetts.
ii. Record an answer to the following question: How many records were returned?
C. Write a SQL query to insert four new records into the Orders and Customers tables using the data below.
Customers Table
Orders Table
D. In the Customers table, perform a query to count all records where the city is Woonsocket and the state is Rhode Island.
i. Record an answer to the following question: How many records are in the Customers table where the field "city" equals "Woonsocket"?
E. In the RMA database, update a customer's records.
i. Write a SQL statement to select the current fields of status and step for the record in the RMA table with an OrderID value of "5175".
1. Record an answer to the following questions: What are the current status and step?
ii. Write a SQL statement to update the status and step for the OrderID, 5175 to status = "Complete" and step = "Credit Customer Account".
1. Record an answer to the following question: What are the updated status and step values for this record? Provide a screenshot of your work.
F. Delete RMA records.
i. Write a SQL statement to delete all records with a reason of "Rejected".
1. Record an answer to the following question: How many records were deleted? Provide a screenshot of your work.
3. Because of a new company branding initiative, you've been asked to change the name of the "Customer" to "Collaborator ". Update your existing table using SQL based on this change in requirements. Copy and paste the SQL you write to do the following action:
A. Rename all instances of "Customer" to "Collaborator ".
4. Create an output file of the required query results. Write a SQL statement to list the contents of the Orders table and send the output to a file that has a CSV extension.
DAD 2 2 0 Project One Complete the steps below to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!