DAD 220 Module Three Major Activity - Taylor

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

220

Subject

Mechanical Engineering

Date

Feb 20, 2024

Type

docx

Pages

6

Uploaded by haleytaylor624

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: This step created a database named QuantigrationRMA that will hold multiple tables.
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. CREATE TABLE Customers (CustomerID INT NOT NULL PRIMARY KEY, FirstName VARCHAR(25), LastName VARCHAR(25), Street VARCHAR(50), City VARCHAR(50), State VARCHAR(25), ZipCode VARCHAR(10), Telephone VARCHAR(15)); This step created a table names Customers within the database QuantigrationRMA, The primary key is the CustomerID which cannot have a NULL values. Other attributes are FirstName, LastName, Street, City, State, ZipCode and Telephone.
b. 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: CREATE TABLE Orders (OrderID INT NOT NULL PRIMARY KEY, CustomerID INT, SKU VARCHAR(20), Description VARCHAR(50), FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID)); This step created a table names Orders within the database QuantigrationRMA, The primary key is the OrderID which cannot have a NULL values. CustomerID in this table is a Foreign Key. Other attributes are SKU and Description.
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
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: CREATE TABLE RMA (RMAID INT NOT NULL PRIMARY KEY, OrderID INT, Step VARCHAR(50), Status VARCHAR(15), Reason VARCHAR(50), FOREIGN KEY (OrderID) REFERENCES Orders(OrderID)); This step created a table names RMA within the database QuantigrationRMA, The primary key is the RMAID which cannot have a NULL values. OrderID in this table is a Foreign Key. Other attributes are Step, Status, and Reason.
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. INSERT INTO Customers VALUES (1, 'Bob', 'Ross', '10 Happy Tree Ln', 'Rossville', 'PA', '15423', '412-652-7426'), (2, 'Jackson', 'Teller', '125 Anarchy Dr', 'Charming', 'CA', '95212', '209-751-2582'), (3, 'Walter', 'White', '54 Breaking Bad Circle', 'Albuquerque', 'NM', '87101', '505-427-6983'), (4, 'John', 'Snow', '87 Wall St', 'New York', 'NY', '10005', '212-825-4596'), (5, 'Meredith', 'Grey', '314 Barrington Ave', 'Seattle', 'WA', '98103', '800- 799-7233'), (6, 'Bobby', 'Boucher', '92 Waterboy St', 'Muddog', 'LA', '70652', '337-921- 0837'), (7, 'Daniel', 'LaRusso', '814 Miyagi Bend', 'Reseda', 'CA', '91335', '213-872- 0125'), (8, 'Sheldon', 'Cooper', '213 N Los Robles Ave', 'Pasadena', 'CA', '91001', '626- 547-6542'), (9, 'Nicole', 'Polizzi', '808 Jersey Shore Dr', 'Seaside Heights', 'NJ', '08751', '732-830-6122'), (10, 'Fiona', 'Gallagher', '2119 S Homan Ave', 'Chicago', 'IL', '60623', '708-578-7099'); This step added the customer information to the Customers Table.
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." CREATE VIEW Collaborator AS SELECT CustomerID AS CollaboratorID, FirstName, LastName, Street, City, State, ZipCode, Telephone FROM Customers; This step created a view in which CustomerID equaled CollaboratorID. The table view renamed the CustomerID 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