Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following normalized tables a)Create a visual ERD for these tables(tables are below) b)Write the Create table statements with proper constraints for these tables

Consider the following normalized tables

a)Create a visual ERD for these tables(tables are below)

b)Write the Create table statements with proper constraints for these tables (Starter code is given below finish it missing some primary/foreign/constraints)

Make sure to run the create table code to ensure that there is no error.

Constraints:

Include all primary key constraints

Include all foreign keys constraints

Check constraints of greater than or equal to zero should be on:

Age, Quota, sales for salesreps, Qty, Amount, price, Qty_On_Hand, Credit_Limit, Target, offices.sales

Tables:

image text in transcribed

Salesreps \begin{tabular}{lllllllll} \hline Empl_Num Name & Age & \multicolumn{2}{l}{ Rep_Office Title } & Hire_Date & Manager Quota & Sales \\ 105 & Bill Adams & 37 & 13 & Sales Rep & 12 -FEB-88 & 104 & 350000 & 367911 \\ 109 & Mary Jones & 31 & 11 & Sales Rep & 12 OCT-89 & 106 & 300000 & 392725 \\ 102 & Sue Smith & 48 & 21 & Sales Rep & 10 -DEC-86 & 108 & 350000 & 474050 \\ 106 & Sam Clark & 52 & 11 & VP Sales & 14-JUN-88 & & 275000 & 299912 \\ 104 & Bob Smith & 33 & 12 & Sales Mggr & 19-MAY-87 & 106 & 200000 & 142594 \\ 101 & Dan Roberts & 45 & 12 & Sales Rep & 20-OCT-86 & 104 & 300000 & 305673 \\ 110 & Tom Sunder & 41 & & Sales Rep & 13-JAN-90 & 101 & & 75985 \\ 108 & Larry Fitch & 62 & 21 & Sales Mgr 12-OCT-89 & 106 & 350000 & 361865 \\ 103 & Paul Cruz & 29 & 12 & Sales Rep & 01-MAR-87 & 104 & 275000 & 286775 \end{tabular} Orders OrderNum112961113012112989113051112968113036113045OrderDate17-DEC-8911-JAN-9003-JAN-9010-FEB-9012-OCT-8930-JAN-9002-FEB-90Cust2117211121012118210221072112Rep106105106108101110108Mff.REIACIFEAQSAACIACIREIProduct2A44L41003114K47410044100Z2A44RQTY7356434910Amount3150037451458142039782250045000 Products MfrIDREIACIQSABICIMMACIProductID2A45C4100YXK4741672779C41003DescriptionRATCHETLINKWIDGETREMOVERREDUCERPLATE900-LBBRACESIZE3WIDGETPrice7927503551801875107QtyOnHand210253809207 Customers \( \begin{array}{llll}\text { Cust_Num } & \text { Company } & \text { Cust_Rep } & \text { Credit_Limit } \\ 2111 & \text { JCP Inc } & 103 & 50000 \\ 2102 & \text { First Corp. } & 101 & 65000 \\ 2103 & \text { Acme Mfg. } & 105 & 50000 \\ 2123 & \text { Carter and Sons } & 102 & 40000 \\ 2107 & \text { Ace Intemational } & 110 & 35000 \\ 2115 & \text { Smithson Corp. } & 101 & 20000 \\ 2117 & \text { J.P. Sinclair } & 106 & 35000\end{array} \) Offices

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

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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What does it mean to clickwrap a license?

Answered: 1 week ago