Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CMP-241 Homework Due February 20, 2019 Advanced Challenge Create two tables based on the E-R model shown in Figure 4-41 and the business rules in

image text in transcribed

CMP-241 Homework Due February 20, 2019 Advanced Challenge Create two tables based on the E-R model shown in Figure 4-41 and the business rules in the following list for a work order tracking database. Include all the constraints in the CREATE TABLE statements. You should have only two CREATE TABLE statements and no ALTER TABLE statements. Name all constraints except NOT NULLs. Project Workorders Proj# P name P desc P budget Wol Proj Wo desc Wo assigned Wo hours Wo start Wo due Will hold a name for the person assigned Dates Will hold a Y or N FIGURE 4-41 Workorders E-R model Use your judgment for column datatypes and sizes. Proj# and Wo# are used to uniquely identify rows in these tables. Each project added must be assigned a name, and no duplicate project names are allowed. Each work order must be assigned to a valid project when added and be assigned a description and number of hours. Each work order added must have a different description. The number of hours assigned to a work order should be greater than zero. If data is provided for the Wo complete column, only Y or N are acceptable values. Create and execute the SQL statements needed to enforce the data relationships among these tables. Datatype recommendations: Varchar: p name, p desc, wo desc, wo assigned Date: wostart, wo.en Char: wo complete Number: prol#, wo#, R-budget, wo hours **You CAN use ALTER table statements and not just CREATE table statements

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