Garcia Module Three Major Activity Database Documentation

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

220

Subject

Chemistry

Date

Feb 20, 2024

Type

docx

Pages

4

Uploaded by MajorIce7236

Report
DAD 220 Module Three Major Activity Database Documentation Template DAD 220 Professor Gross Jarrod Garcia 10 November 2023 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: [Code used: Create database QuantigrationRMA, show database, 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: [Code Used: CREATE TABLE Customers ( Customer_ID INT, First_Name VARCHAR(25), Last_Name VARCHAR(25), Street VARCHAR(50), City VARCHAR(50), State VARCHAR(25), ZipCode VARCHAR(10), Telephone VARCHAR(15), PRIMARY KEY (Customer_ID));] 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: [Code Used: CREATE TABLE Orders (Order_ID INT, Customer_ID INT, SKU VARCHAR(20), Description VARCHAR(50), PRIMARY KEY (Order_ID), FOREIGN KEY (Customer_ID) REFERENCES Customers(Customer_ID)); 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:
[Code Used: CREATE TABLE RMA ( RMA_ID INT, Order_ID INT, Step VARCHAR(50), Status VARCHAR(15), Reason VARCHAR(15), PRIMARY KEY (RMA_ID), FOREIGN KEY (Order_ID) REFERENCES Orders(Order_ID)); 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. [Code used: INSERT INTO Customers VALUES (101,'John','Wick','Continental Ave','New York City','NY','10007','2127555900') (102,'Debra','Morgan','10th Street','Houston','TX','77806','2814561452'), (103,'Kevin','Richards','Carter Lane','Clarksville','TN','37042','6157854122'), (104,'Carol','Klein','Old Wagon Road','Yukon','OK','73099','4058876633'), (105,'Brett','Pilsner','Main Street','Katy','TX','77494','2814441569'), (106,'Kelly','Trainer','Wildflower Lane','New Braunfels','TX','78130','8309974152'), (107,'Jason','Stafford','TreeHollow Trail','Forney','TX','75126','4695552141'), (108,'Sharon','Wagner','Sunset Hill Street','Summerville','SC','29486','843'), (109,'Charles','Crites','Copper Circle','Cypress','TX','77433','2817462321'), (110,'Scarlett','Rodriguez','Surfside Ave','Kissimmee','FL','34747','4078854178');] 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
[Code Used: CREATE VIEW Collaborators AS SELECT Customer_ID AS Collaborator_ID, First_Name, Last_Name FROM Customers;