Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Completing the CREATE TABLE statements Address Column Data Type Rules addressID INT IDENTITY addressLine VARCHAR(100) NOT NULL suburb VARCHAR(50) NOT NULL postcode VARCHAR(10) NOT NULL

  1. Completing the CREATE TABLE statements
Address
ColumnData TypeRules
addressIDINTIDENTITY
addressLineVARCHAR(100)NOT NULL
suburbVARCHAR(50)NOT NULL
postcodeVARCHAR(10)NOT NULL
regionVARCHAR(50)NOT NULL
countryVARCHAR(50)NOT NULL
Customers
ColumnData TypeRules
customerIDINTIDENTITY
firstNameVARCHAR(100)NOT NULL
lastNameVARCHAR(100)NOT NULL
emailVARCHAR(100)NOT NULL
mainPhoneNumberVARCHAR(15)NOT NULL
secondaryPhoneNumberVARCHAR(15)
addressIDINTFK

ItemCategories
ColumnData TypeRules
categoryIDINTIDENTITY
parentCategoryIDINTFK
categoryNameVARCHAR(100)NOT NULL
Items
ColumnData TypeRules
itemIDINTIDENTITY
itemNameVARCHAR(150)NOT NULL
itemDescriptionVARCHAR(MAX)NOT NULL
itemCostDECIMAL(10,2)NOT NULL
itemImageVARCHAR(MAX)NOT NULL
categoryIDINTFK

CustomerOrders
ColumnData TypeRules
orderNumberINTIDENTITY
customerIDINTFK
orderDateDATENOT NULL, DEFAULT GetDate()
totalValueDECIMAL(10,2)NOT NULL
datePaidDATE
ItemsInOrder
ColumnData TypeRules
orderNumberINTFK
ItemIDINTFK
numberOfINTNOT NULL, DEFAULT 1

Reviews
ColumnsData TypeRules
customerIDINTFK
itemIDINTFK
reviewDateDATENOT NULL, DEFAULT GetDate()
ratingINTNOT NULL, CHECK(1-5)
reviewDescriptionVARCHAR(MAX)NOT NULL

  1. Running the Queries
  2. Load SQL Management Studio which you should have installed at this point.
  3. Connect to your default Server (usually selected by default) by clicking "Connect"

imageimageimageimageimageimageimageimageimageimageimageimageimageimage

Connect to Server Microsoft SQL Server 2012 Server type: Server name: Authentication: User name: Password: Connect Database Engine P112-02\SQLEXPRESS Windows Authentication UNINET kellydr Remember password Cancel Help x Options >>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Computer Network questions

Question

Write a report on "Cross-Culture Leadership"

Answered: 1 week ago

Question

If M = 7, s = 2, and X = 9.5, what is z?

Answered: 1 week ago