Engineering Homework Help

Engineering Homework Help. DAD 220 Southern New Hampshire University SQL Database Documentation Worksheet

Competencies

In this project, you will demonstrate your mastery of the following competencies:

  • Create a structured database through the use of relational concepts
  • Implement basic processing functionalities to create new structured database environments

Step One Scenario

You are working as a database administrator for Quantigration, a networking equipment manufacturer. The company has grown quickly and is still evolving its internal business processes to handle the rapid growth. Customer return merchandise authorizations (RMAs), used to track shipments for defective or incorrect parts, are a specific area that has been identified as problematic.

Your supervisor at Quantigration has asked you, as part of their development team, to create a database for a new software application that will be used for processing RMAs. Because there are several locations where merchandise can be taken in, the application will also need to record where items are received. This system will also capture where the equipment is going next—repair, scrap, or refurbishing and resale. The warehouse shipping and receiving employees at your company will be the people using this application and are considered your “end users” for the application. Part of their job is to process customer return shipments. This involves the following:

  • Assessing the quality of the items being returned for defects
  • Identifying missing parts
  • Identifying signs of obvious wear and tear (such as dents or scratches to the equipment)

Step One Directions

Create a Database

The data architect on your DevOps team has come to you with a logical database diagram referred to as an entity relationship diagram (ERD). This is a documentation of the tables, their relationships to each other, their attributes, and any primary or foreign keys on those attributes. These elements are required to create the new database. To create your three tables named customers, orders, and rma in the QuantigrationUpdates  database based on the example you have been given, complete the following steps, and place your work in the provided Database Documentation Template:

  • Prior to beginning, review the example entity relationship diagram (ERD) in the Quantigration RMA Diagram document. A text version of this diagram is available: Quantigration RMA Diagram Text Version.
  1. Navigate to your online integrated development environment (IDE). Here, you will need to write the proper SQL commands in command line to create tables that demonstrate relationships based on the entity relationship diagram.
  2. Create a database schema called QuantigrationUpdates and list it out to the screen.
  3. Using the ERD as a reference, create the following tables with the appropriate attributes and keys:
    • A table to store customer information with a primary key of Customer ID
    • A table to store order information with a primary key of Order ID
    • A table to store RMA information with a primary key of RMA ID
  4. Due to 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:
    • Rename all instances of “Customer” to “Collaborator.”

STOP: Make sure to save your work before moving on to Step Two of this process. You will 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 those tables. You will be using the QuantigrationUpdates database and three tables that were created in Step One to import data from the CSV data files into the tables, perform queries against those tables, and create an output listing to the screen of the query results. Your goal is to track shipments for defective or incorrect parts.

The shipping and receiving team that you are working with has been keeping records of their RMAs in spreadsheets, while your team has been creating its database in MySQL. The information that they have is detailed and won’t need cleaning. The data in the tables can be exported to CSV files. The data should also align with the columns and data types in your tables.

Step Two Directions

Load and Query the Data

In Step One, you created a customer return merchandise authorization (RMA) database using SQL to create tables and placed your work in the database documentation template. To complete your objectives in this step, continue to place your work in the database documentation template and follow these directions:

  • Please note before you begin that the three data files being used for this project are preloaded into Codio:
    • rma.csv
    • customers.csv
    • orders.csv
  1. Import the data from each file into tables.
    • Use the QuantigrationUpdates database, the three tables you created, and the three CSV files preloaded into Codio.
    • Use the import utility of your database program to load the data from each file into the table of the same name. You will perform this step three times, once for each table.
  2. Write basic queries against imported tables to organize and analyze targeted data. For each query, include a screenshot of the query and its output. You should also include a brief, 1- to 3-sentence description of the output.
    • Write an SQL query that returns the count of orders for customers located only in the city of Framingham, Massachusetts.
      1. This query will use a table join between the customers and orders tables. The query will also use a where clause.
      2. How many records were returned?
    • Write an SQL query to select all of the customers located in the state of Massachusetts.
      1. Use a WHERE clause to limit the number of records in the customers table to only those who are located in Massachusetts.
      2. Record an answer to the following question: How many records were returned?
    • Write an SQL query to insert four new records into the orders and customers tables using the following data:Customers TableCustomerIDFirstNameLastNameStreetAddressCityStateZipCodeTelephone100004LukeSkywalker15 Maiden LaneNew YorkNY10222212-555-1234100005WinstonSmith123 Sycamore StreetGreensboroNC27401919-555-6623100006MaryAnneJenkins1 Coconut WayJupiterFL33458321-555-8907100007JanetWilliams55 Redondo Beach BlvdTorrenceCA90501310-555-5678Orders TableOrderIDCustomerIDSKUDescription1204305100004ADV-24-10CAdvanced Switch 10GigE Copper 24 port1204306100005ADV-48-10FAdvanced Switch 10 GigE Copper/Fiber 44 port copper 4 port fiber1204307100006ENT-24-10FEnterprise Switch 10GigE SFP+ 24 Port1204308100007ENT-48-10FEnterprise Switch 10GigE SFP+ 48 port
    • In the customers table, perform a query to count all records where the city is Woonsocket, Rhode Island.
      1. How many records are in the customers table where the field “city” equals “Woonsocket”?
    • In the rma database, update a customer’s records.
      1. Write an 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. What are the current status and step?
      2. Write an SQL statement to update the status and step for the orderid, 5175 to status = “Complete” and step = “Credit Customer Account.”
        1. What are the updated status and step values for this record? Provide a screenshot of your work.
    • Delete rma records.
      1. Write an SQL statement to delete all records with a reason of “Rejected.”
        1. How many records were deleted? Provide a screenshot of your work.
  3. Create an output file of the required query results. Write an SQL statement to list the contents of the orders table and send the output to a file that has a .csv extension.

Engineering Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"