Question
You have been hired by a small retail outlet store in your community to help them build a small database that will help them track
You have been hired by a small retail outlet store in your community to help them build a small database that will help them track customers, products and orders placed. This database will have three tables, and your task noted below is to write the code needed to generate the tables as designed.
Given the requirements for a database in the chart below, construct the SQL code needed to create each table. You can use this site to create and validate your code:
- Ensure you correctly identify the primary key fields in your code that are required to create the tables.
- Provide clear comments in the code.
- Discuss the fields you will use to join these tables together to make the database relational.
When you have completed this assignment, copy and paste your code into a Word document along with your response to the question and submit it for review. This assignment will be assessed by your instructor using the Building a Database Rubric.
Table Name | Field | Data Type | Required? |
---|---|---|---|
Customers | CustomerID | Integer | Y |
FirstName | Variable Character | Y | |
LastName | Variable Character | Y | |
Address1 | Variable Character | Y | |
Address2 | Variable Character | N | |
CustCity | Variable Character | Y | |
CustState | Character | Y | |
CustZipCode | Character | Y | |
Variable Character | N | ||
AccountCreated | DateTime | Y | |
Orders | OrderID | Integer | Y |
OrderDate | DateTime | Y | |
OrderItemName | Variable Character | Y | |
OrderQuantity | Integer | Y | |
ProductID | Integer | Y | |
Products | ProductID | Integer | Y |
ProductName | Variable Character | Y | |
ProductDesc | Variable Character | Y | |
ProdManfacName | Variable Character | Y |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Here is the SQL code to create the three tables Customers Orders and Products based on the provided ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started