Question: 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

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.

Figure 4-41:

Project Workorders Proj# P_name P_desc P_budget Wo# Proj# Wo_desc Wo_assigned Wo_hours Wo_start Wo_due Will hold a name

€¢ 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.

Project Workorders Proj# P_name P_desc P_budget Wo# Proj# Wo_desc Wo_assigned Wo_hours Wo_start Wo_due Will hold a name for the person assigned Dates Wo_complete- Will hold a Y or N

Step by Step Solution

3.49 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

CREATE TABLE project proj NUMBER4 pname VARCHAR220 NOT NULL ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

1803_60b8c12123051_716107.pdf

180 KBs PDF File

Word file Icon

1803_60b8c12123051_716107.docx

120 KBs Word File

Students Have Also Explored These Related Oracle 12c SQL Questions!