Programming Question

Competencies

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

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
  • Create a structured database through the use of relational concepts
  • Implement basic processing functionalities to create new structured database environments

Step One: Scenario

You’re working as a database administrator for Quantigration, a networking equipment manufacturer. The company has grown quickly, and it’s still figuring out its internal business processes. Customer return merchandise authorizations (RMAs) are used to track shipments for defective or incorrect parts. The company has identified RMAs as a specific problematic area.

Your supervisor at Quantigration asked you 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 must also 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 using this application; they are considered your “end users” for the application. Part of their job is to process customer return shipments. This involves the following steps:

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

Step One: Directions

Create a DatabaseThe 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 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.

Prior to beginning, review the example ERD in the Quantigration RMA Diagram document in

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Supporting Materials

.

Create your three tables, named Customers, Orders, and RMA, in the QuantigrationUpdates database based on the example you‘ve been given. To do this, complete the following steps and place your work in the provided Database Documentation Template:

  • Navigate to your online integrated development environment (IDE). The next set of steps will help you write SQL commands to create tables that demonstrate relationships based on the ERD.
  • Create a database schema called QuantigrationUpdates that will hold tables by using SQL commands. List it out to the screen.
  • 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 IDA table to store order information with a primary key of Order ID and a foreign key of Customer IDA table to store RMA information with a primary key of RMA ID and a foreign key of Order ID

    STOP: Make sure to 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 those tables. You’ll be using the QuantigrationUpdates database and the three tables you created in Step One to do the following:

    • Import data from the CSV data files into the tables
    • Perform queries against those tables
    • Create an output listing to the screen of the query results

    The shipping and receiving team that you are working with has been keeping records of their RMAs in spreadsheets, and 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 DataIn Step One, you created a customer 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.csvCustomers.csvOrders.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’ll 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 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.This query will use a table join between the Customers and Orders tables. The query will also use a WHERE clause.How many records were returned?Write an SQL query to select all of the customers located in the state of Massachusetts.Use a WHERE clause to limit the number of records in the customers table to only those who are located in Massachusetts.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 TableCustomerIDFirstNameLastNameStreetAddressCityStateZip CodeTelephone 10

      0004 LukeSkywalker17 Maiden LaneNew YorkNY10222212-555-1234 100005WinstonSmith128 Sycamore Street GreensboroNC27401919-555-6623 100006MaryAnneJenkins2 Coconut WayJupiterFL33458321-555-8907 100007JanetWilliams58 Redondo Beach BlvdTorrenceCA90501310-555-5678 Orders TableOrderIDCustomerIDSKUDescription1

      20

      4305 100004ADV-24-10C Advanced Switch 10GigE Copper 24 port 1204306100005ADV-48-10F Advanced Switch 10 GigE Copper/Fiber 44 port copper 4 port fiber 1204307100006ENT-24-10F Enterprise Switch 10GigE SFP+ 24 Port 1204308100007ENT-48-10F Enterprise Switch 10GigE SFP+ 48 port In the Customers table, perform a query to count all records where the city is Woonsocket, Rhode Island.How many records are in the customers table where the field “city” equals “Woonsocket”?In the RMA database, update a customer’s records.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.”What are the current status and step?Write an SQL statement to update the status and step for the OrderID, 5175 to status = “Complete” and step = “Credit Customer Account.”What are the updated status and step values for this record? Provide a screenshot of your work. Delete RMA records.Write an SQL statement to delete all records with a reason of “Rejected”.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:Rename all instances of “Customer” to “Collaborator.”
    4. 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.

    What to Submit

    To complete this project, you must submit the following:

    Database DocumentationComplete and submit the Database Documentation Template. This will be where you capture the work that you’ve done in both Step One and Step Two. Follow the specific instructions for the directions outlined here and within the template itself.

    Supporting Materials

    The CSV data files that you’ll be working with can be found in Codio. They are listed vertically in the left pane of your Codio web interface. The following resource(s) may support your work on the project:

    Document: Database Documentation Template ExampleAs you complete your database documentation template, refer to this document for an example of how to insert screenshots to capture your work.

    Document: Quantigration RMA DiagramThis ERD shows the relationships of entities in the database. Download this ERD and use it to support your work on this project. A text version of the diagram is available: Quantigration RMA Diagram Text Version.

    Project One Rubric

    Write SQL Commands to Create Tables

    )

    Create a Database Schema

    Does not attempt criterion (0%)10

    Update Existing Table Using SQLN/A

    Does not attempt criterion (0%)

    Import Data Into TablesExceeds proficiency in an exceptionally clear, insightful, sophisticated, or creative manner (100%)

    Does not attempt criterion (0%)10

    Write Basic QueriesExceeds proficiency in an exceptionally clear, insightful, sophisticated, or creative manner (100%)

    Does not attempt criterion (0%)20

    Create Output FileN/A

    Does not attempt criterion (0%)10

    Articulation of Response (Descriptions Only)Exceeds proficiency in an exceptionally clear, insightful, sophisticated, or creative manner (100%)

    10

    100%

    Criteria Exemplary Proficient Needs Improvement Not Evident Value
    Exceeds proficiency in an exceptionally clear, insightful, sophisticated, or creative manner (

    100% Writes SQL commands to create tables that demonstrate relationships based on the ERD (85%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include inaccuracies in the SQL and tables (55%) Does not attempt criterion (0%) 25
    N/A Creates schema that will hold tables by using SQL commands (100%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include schema that do not hold tables (55%)
    Updates existing table using SQL based on change in requirements (100%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include addition of incorrect data in updates (55%) 15
    Imports new data into tables and modifies existing records in tables (85%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include additional detail in importing and modifying data (55%)
    Writes basic queries against imported tables to organize and analyze targeted data (85%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include level of detail of queries (55%)
    Creates an output file of the required query results (100%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include inaccuracies in the output file of query results (55%)
    Clearly conveys meaning with correct grammar, sentence structure, and spelling, demonstrating an understanding of audience and purpose (85%) Shows progress toward proficiency, but with errors in grammar, sentence structure, and spelling, negatively impacting readability (55%) Submission has critical errors in grammar, sentence structure, and spelling, preventing understanding of ideas (0%)
    Total:

    DAD 220 Database Documentation Template
    Complete these steps as you work through the directions for Project One. Replace the bracketed text
    with your screenshots and brief explanations of the work they capture. Each screenshot and its
    explanation should be sized to approximately one quarter of the page, with the description written
    below the screenshot. Follow these rules for each of the prompts and questions below. Review the
    example document located in the Project One Supporting Materials for assistance.
    Step One: Create a Database
    1. Navigate to your online integrated development environment (IDE). List and record the SQL
    commands that you used to complete this step here:
    [Insert screenshot and brief explanation here.]
    2. Create a database schema called QuantigrationUpdates. List out the database name. Provide the
    SQL commands you ran against MySQL to successfully complete this in your answer:
    [Insert screenshot and brief explanation here.]
    3. Using the entity relationship diagram (ERD) as a reference, create the following tables with the
    appropriate attributes and keys:
    a. A table named Customers in the QuantigrationUpdates database, as defined on the
    project ERD. Provide the SQL commands you ran against MySQL to complete this
    successfully in your answer:
    [Insert screenshot and brief explanation here.]
    b. A table named Orders in the QuantigrationUpdates database, as defined on the project
    ERD. Provide the SQL commands you ran against MySQL to complete this successfully in
    your answer:
    [Insert screenshot and brief explanation here.]
    c. A table named RMA in the QuantigrationUpdates database, as defined on the project
    ERD. Provide the SQL commands you ran against MySQL to complete this successfully in
    your answer:
    [Insert screenshot and brief explanation here.]
    Step Two: Load and Query the Data
    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.
    [Insert screenshot and brief explanation here.]
    2. Write basic queries against imported tables to organize and analyze targeted data. For each
    query, replace the bracketed text with a screenshot of the query and its output. You should also
    include a 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.
    i. How many records were returned?
    [Insert screenshot and brief explanation here.]

    Write an SQL query to select all of the Customers located in the state of 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?
    [Insert screenshot and brief explanation here.]

    Write a SQL query to insert four new records into the Orders and Customers tables using
    the following data:
    Customers Table
    CustomerID
    FirstName
    LastName
    StreetAddress
    City
    State
    ZipCode
    Telephone
    100004
    Luke
    Skywalker
    15 Maiden Lane
    New York
    NY
    10222
    212-555-1234
    100005
    Winston
    Smith
    123 Sycamore
    Street
    Greensbor
    o
    NC
    27401
    919-555-6623
    100006
    MaryAnne
    Jenkins
    1 Coconut Way
    Jupiter
    FL
    33458
    321-555-8907
    100007
    Janet
    Williams
    55 Redondo
    Beach Blvd
    Torrence
    CA
    90501
    310-555-5678
    [Insert screenshot and brief explanation here.]
    Orders Table
    OrderID
    CustomerID
    SKU
    Description
    1204305
    100004
    ADV-24-10C
    Advanced Switch 10GigE Copper 24 port
    1204306
    100005
    ADV-48-10F
    Advanced Switch 10 GigE Copper/Fiber 44 port
    copper 4 port fiber
    1204307
    100006
    ENT-24-10F
    Enterprise Switch 10GigE SFP+ 24 Port
    1204308
    100007
    ENT-48-10F
    Enterprise Switch 10GigE SFP+ 48 port
    [Insert screenshot and brief explanation here.]

    In the Customers table, perform a query to count all records where the city is
    Woonsocket, Rhode Island.
    i. How many records are in the Customers table where the field “city” equals
    “Woonsocket”?
    [Insert screenshot and brief explanation here.]

    In the RMA database, update a customer’s records.
    i. 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?
    [Insert screenshot and brief explanation here.]
    ii. 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?
    [Insert screenshot and brief explanation here.]

    Delete RMA records.
    i. Write an SQL statement to delete all records with a reason of “Rejected.”
    1. How many records were deleted?
    [Insert screenshot and brief explanation here.]
    3. Update your existing tables from “Customer” to “Collaborator” using SQL based on this change
    in requirements. Provide the SQL commands you ran against MySQL to complete this
    successfully in your answer:
    a. Rename all instances of “Customer” to “Collaborator.”
    [Insert screenshot and brief explanation here.]
    4. 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.
    [Insert screenshot and brief explanation here.]

    Still stressed with your coursework?
    Get quality coursework help from an expert!