Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Please tell me how to create these tables in sql. (So I mean tell me their data types, the types of their keys and whether

image text in transcribed

Please tell me how to create these tables in sql.

(So I mean tell me their data types, the types of their keys and whether they are null or not null)

REGION INCLUDES VENDOR \begin{tabular}{|l|l|} \hline RegionID & RegionName \\ \hline C & Chicagoland \\ \hline T & Tristate \\ \hline \end{tabular} STORE \begin{tabular}{|l|l|l|} \hline StoreID & StoreZip & RegionID \\ \hline S1 & 60600 & C \\ \hline S2 & 60605 & C \\ \hline S3 & 35400 & T \\ \hline \end{tabular} \begin{tabular}{|l|l|l|} \hline ProductID & TID & Quantity \\ \hline 11 & T111 & 1 \\ \hline 22 & T222 & 1 \\ \hline 33 & T333 & 5 \\ \hline 11 & T333 & 1 \\ \hline 44 & T444 & 1 \\ \hline 22 & T444 & 2 \\ \hline 44 & T555 & 4 \\ \hline 55 & T555 & 2 \\ \hline 66 & T555 & 1 \\ \hline \end{tabular} \begin{tabular}{|l|l|} \hline VendorID & VendorName \\ \hline PG & Pacifica Gear \\ \hline MK & Mountain King \\ \hline \end{tabular} CATEGORY \begin{tabular}{|l|l|} \hline CategoryID & CategoryName \\ \hline CP & Camping \\ \hline FW & Footwear \\ \hline \end{tabular} SALESTRANSACTION \begin{tabular}{|l|l|l|l|} \hline TID & CustomerID & StoreID & TDate \\ \hline T111 & 12333 & S1 & 1-Jan-2020 \\ \hline T222 & 23444 & S2 & 1-Jan-2020 \\ \hline T333 & 12333 & S3 & 2-Jan-2020 \\ \hline T444 & 34555 & S3 & 2-Jan-2020 \\ \hline T555 & 23444 & S3 & 2-Jan-2020 \\ \hline \end{tabular} CUSTOMER \begin{tabular}{|l|l|l|} \hline CustomerID & CustomerName & CustomerZip \\ \hline 12333 & Tina & 60137 \\ \hline 23444 & Tony & 60611 \\ \hline 34555 & Pam & 35401 \\ \hline \end{tabular} PRODUCT \begin{tabular}{|l|l|l|l|l|} \hline ProductID & ProductName & ProductPrice & VendorID & CategoryID \\ \hline 11 & Zzz Bag & $100 & PG & CP \\ \hline 22 & Easy Boot & $70 & MK & FW \\ \hline 33 & Cosy Sock & $15 & MK & FW \\ \hline 44 & Dura Boot & $90 & PG & FW \\ \hline 55 & Tiny Tent & $150 & MK & CP \\ \hline 66 & Biggy Tent & $250 & MK & CP \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions