DAD-220 Project One Database Documentation

DAD-220

December 2, 2020

DAD-220 Project One: Creating a Database and Querying Data

Step One: Create a Database

1. Navigate to your online integrated development environment (IDE). Here, you will need to write

the proper SQL commands in command line to create tables that demonstrate relationships

based on the entity relationship diagram. List and record the SQL commands that you used to

complete this step here:

As with all assignments, we must first connect our terminal in the Codio workspace. Once the

terminal is open, we link to a MySQL session by typing “mysql” and pressing the “Enter” key.

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:

 1 / 2

Initially, we are tasked to create an empty database schema name QuantigrationUpdates. A simple

CREATE DATABASE statement creates the empty database while the SHOW DATABASES checks all

databases in the workspace for creation.

3. Using the 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:

USE QuantigrationUpdates;

 CREATE TABLE Customers(CustomerID INT, FirstName VARCHAR(25), LastName

VARCHAR(25), Street VARCHAR(50), City VARCHAR(50),

State VARCHAR(25), ZipCode INT, Telephone VARCHAR(15),

PRIMARY KEY (CustomerID)

);

 DESCRIBE Customers;

After carefully reviewing the ERD again, I began filling the database with tables

after connecting with the USE statement. Per the ERD specifications, I created the

Customers table first with the primary key set as CustomerID. We finish by validating

with the DESCRIBE STATEMENT. In our query results, we can validate that the attributes

and data types match the ERD.

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:

Powered by qwivy(www.qwivy.org)

 2 / 2

No comments found.
Login to post a comment
This item has not received any review yet.
Login to review this item
No Questions / Answers added yet.
Version 2021
Category Exam (elaborations)
Authors qwivy.com
Pages 14
Language English
Comments 0
Sales 0
Recently viewed items

We use cookies to understand how you use our website and to improve your experience. This includes personalizing content and advertising. To learn more, please click Here. By continuing to use our website, you accept our use of cookies, Privacy policy and terms & conditions.

Processing