DAD 220 Module Three Major Activity Database Documentation Template (1)

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

210

Subject

Mechanical Engineering

Date

Feb 20, 2024

Type

docx

Pages

7

Uploaded by ChefHeatAardvark16

Report
DAD 220 Module Three Major Activity Database Documentation Template Overview Complete these steps as you work through the directions for this activity. Replace the bracketed text with your screenshots and brief explanations of the work they show. 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 for help. Create a Database 1. In your integrated development environment (IDE), create a database schema called QuantigrationRMA. List out the database name. Provide the SQL commands you ran to successfully complete this in your answer, then connect to it: For me to perform what was required, I had to run the following commands to create the database: CREATE DATABASE QuantigrationRMA; Then, USE QuantigrationRMA; 2. 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 QuantigrationRMA database as defined on the project ERD. Provide the SQL commands you ran against MySQL to complete this successfully in your answer:
As shown in the screenshot above, the table’s names and customers were created using the following: CREATE TABLE Customers ( CustomerID INT, FirstName VARCHAR(25), LastName VARCHAR(25), StreetAddress VARCHAR(50), City VARCHAR(50), State VARCHAR(25), ZipCode INT, Telephone VARCHAR(15), PRIMARY KEY(CustomerID) ) ;
b. A table named orders in the QuantigrationRMA database as defined on the project ERD. Provide the SQL commands you ran against MySQL to complete this successfully in your answer: For me to create the Orders table, I used the following commands in MySQL: CREATE TABLE Orders ( OrderID INT, CustomerID INT, SKU VARCHAR(20), Description VARCHAR(50), PRIMARY KEY(OrderID) ) ; c. A table named rma in the QuantigrationRMA database as defined on the project ERD. Provide the SQL commands you ran against MySQL to complete this successfully in your answer:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
For me to create the RMA table, I used the following commands in MySQL: CREATE TABLE RMA ( RMAID INT, OrderID INT, Step VARCHAR(50), Status VARCHAR(15), Reason VARCHAR(15), PRIMARY KEY(RMAID) ) ;
The screenshot above shows that each table created works as it is intended to. 3. Manually add 10 records into the Customers table . The data can be made up for now, as you you’ll populate all three tables later from the provided CSV files. For me to add 10 records manually, I simply added the following inputs into the MySQL:
INSERT INTO Customers VALUES (CustomerID INT, FirstName VARCHAR, LastName VARCHAR, StreetAddress VARCHAR, City VARCHAR, State VARCHAR, ZipCode VARCHAR, Telephone VARCHAR); I started by entering the data for ten new clients. I decided to enter them one at a time to be sure I didn't make a mistake. 4. Create a view from the existing Customers table by using the SQL command provided below to say "Collaborators." The view should show all instances of "Customer" renamed as "Collaborator."
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
The steps I took to finish the task are listed below. As you can see, I used the view command to update the current table using the information from the training video, knowing that it will come in handy in the future. CREATE VIEW Collaborators AS SELECT CustomerID AS CollaboratorID, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109 FROM Customers; DESCRIBE Collaborators; Then, SELECT * FROM Collaborators LIMIT 5; Following that, I asked MySQL to define Collaborators, and it filled in the appropriate table with the relevant data. I then instructed MySQL to choose just five clients from the Collaborators table, as instructed, and it successfully completed the task.