Long DAD 220 Module Three Major Activity Database Documentation Template (2)

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

220

Subject

Mechanical Engineering

Date

Apr 3, 2024

Type

docx

Pages

6

Uploaded by alyssamcarthur2

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: ->mysql; enter ->create database QuantigrationRMA; enter ->show databases; enter ->use QuantigrationRMA; enter 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 PRIMARY KEY, ->FirstNAme VARCHAR(25), ->LastNAme VARCHAR(25), ->Street VARCHAR(50), ->City VARCHAR(50), ->State VARCHAR(25), ->ZipCode VARCHAR(10), ->Telephone VARCHAR(15)); enter ->describe Customers; enter 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:
->Create Table Orders( ->OrderID INT PRIMARY KEY, ->CustomerID int, ->SKU VARCHAR(20), ->Description VARCHAR(20), ->FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID)); Enter ->Describe Orders; 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
-> CREATE TABLE RMA( ->RMAID INT PRIMARY KEY, ->OrderID INT, ->Step VARCHAR(50), ->Status VARCHAR(15), ->Reason VARCHAR(15), ->FOREIGN KEY(OrderID) REFERENCES Orders(OrderID)); enter ->describe RMA; 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,'John','Smith','123 Elm Street','Grove City','Pennsylvania','16127','1112223333'), -> (2,'Jane','Smith','234 Oak Street','Grove City','Pennsylvania','16127','2223334444'); -> (3,'Ivan','Moody','144 Elm Street','Grove City','Pennsylvania','16127','5556667899'), -> (4,'Zoltan','Smith','119 Poplar Street','Grove City','Pennsylvania','16127','1114445555'), -> (5,'Dean','Felix','111 West Main Street','Grove City','Pennsylvania','16127','3337778888'), -> (6,'Alice','Rose','22 Flower Avenue','Grove City','Pennsylvania','16127','6667779999'), -> (7,'Daniel','Smith','33 Lake Street','Grove City','Pennsylvania','16127','4445557777'),
-> (8,'John','Williams','444 High Street','Grove City','Pennsylvania','16127','9995553456'), -> (9,'Amanda','Beggs','3344 East Main Street','Grove City','Pennsylvania','16127','0004445555'), -> (10,'Susan','Snow','345 Oak Street','Grove City','Pennsylvania','16127','8889993465'); enter ->Select * From Customers; enter 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; enter ->Describe Collaborator; Enter Select* From Collaborator Limit 5; Enter
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