Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to write code to create a MAINTENANCE table and its required constraints. The table below provides details of the meaning of the additional attributes

How to write code to create a MAINTENANCE table and its required constraints. The table below provides details of the meaning of the "additional" attributes in the MAINTENANCE table. You must pick RESTRICT/NO ACTION on the delete rule for all FK constraints.

Attribute name Meaning
maint_id Maintenance ID (unique for each maintenance record)
maint_datetime Maintenance date and time
maint_des Maintenance description
maint_cost Maintenance cost
maint_assigned Maintenance assignment to a vendor (Y - yes, N - no). Yes means that the maintenance is carried out by a vendor. No means that the maintenance is carried out by the owner.

2. Create two sequences which could be used to provide primary key values for the OWNER and PROPERTY tables (one for each PK). Both sequences should start at 1 and increment by 1. Immediately prior to the create sequence commands, place appropriate DROP SEQUENCE commands so they will cause the sequences to be dropped before being created if they exist. 3. Insert one OWNER, one PROPERTY, and two MAINTENANCE entries into respective tables: a. You must make up your own data. The data added must be sensible eg. you must not use 'Test1' or 'Owner1' as owner names b. You must make use of the sequences when adding the owner and property. c. At this stage, prior to our study of transactions, you should include one commit after all inserts to make the changes correctly recorded in the database. We will re examine such processes after studying transactions If you have problems with these tasks simply rerun proprental_schema_start.sql which will cause all tables to be dropped and OWNER and PROPERTY tables to be recreated, then correct the issues in your scrip

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

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