Task 3 Provide the implementation of the following trigger. For submission, please include both the PL/SQL code and an i
Posted: Thu Jun 02, 2022 8:26 am
Task 3
Provide the implementation of the following trigger. For
submission, please include both the PL/SQL code and an insert
statement to demonstrate the trigger functionality.
a. A Trigger which automatically stores the information of a job
in a backup table called DeletedJobs, when the job is deleted from
the job table. Do not use Job ID as the primary key in the backup
table, instead, use a database sequence object.
The list of tables available for this task is the following:
CLIENT (ClientNo, ClientName, ClientAddress, ClientPhone,
ClientEmail)
CORPORATE_CLIENT (ClientNo, CorporationName,
BusinessAddress)
INDIVIDUAL_CLIENT (ClientNo, PropertyOwner)
BUSINESS (ABNNumber, BusinessName, ContactName, ContactNumber,
ContactEmail, BusinessAddress, BusinessPostcode)
FREELANCER_BUSINESS (ABNNumber, EliteMemberID)
CORPORATE_BUSINESS (ABNNumber)
JOB (JobID, JobDescription, UrgencyLevel, JobAddress, Postcode,
SelectedBusinessABNNumber, IndustryID)
CONTRACT_JOB (JobID, StartDate, EndDate, CorporateClientNo)
CASUAL_JOB (JobID, IndividualClientNo)
INDUSTRY (IndustryID, IndustryTitle, UnionID)
TRADE_UNION (UnionID, UnionTitle, UnionContactName,
UnionContactNumber, UnionEmail, UnionAddress, EliteMemberID)
SUBURB (Postcode, SuburbName)
INVOICE (InvoiceNo, Amount, JobID)
SEMINAR (SeminarID, SeminarTitle, SeminarDataTime,
SeminarVenue)
QUOTATION (JobID, ABNNumber, QuoteAmount)
BUSINESS_INDUSTRY (ABNNumber, IndustryID)
ADJACENT_SUBURB (PostCode, AdjacentPostCode)
ELITE_MEMBER (EliteMemberID)
SEMINAR_ATTENDIES (EliteMemberID, SeminarID)
NOTE: PK is printed underlined and FK is printed italic in
italics.
Provide the implementation of the following trigger. For
submission, please include both the PL/SQL code and an insert
statement to demonstrate the trigger functionality.
a. A Trigger which automatically stores the information of a job
in a backup table called DeletedJobs, when the job is deleted from
the job table. Do not use Job ID as the primary key in the backup
table, instead, use a database sequence object.
The list of tables available for this task is the following:
CLIENT (ClientNo, ClientName, ClientAddress, ClientPhone,
ClientEmail)
CORPORATE_CLIENT (ClientNo, CorporationName,
BusinessAddress)
INDIVIDUAL_CLIENT (ClientNo, PropertyOwner)
BUSINESS (ABNNumber, BusinessName, ContactName, ContactNumber,
ContactEmail, BusinessAddress, BusinessPostcode)
FREELANCER_BUSINESS (ABNNumber, EliteMemberID)
CORPORATE_BUSINESS (ABNNumber)
JOB (JobID, JobDescription, UrgencyLevel, JobAddress, Postcode,
SelectedBusinessABNNumber, IndustryID)
CONTRACT_JOB (JobID, StartDate, EndDate, CorporateClientNo)
CASUAL_JOB (JobID, IndividualClientNo)
INDUSTRY (IndustryID, IndustryTitle, UnionID)
TRADE_UNION (UnionID, UnionTitle, UnionContactName,
UnionContactNumber, UnionEmail, UnionAddress, EliteMemberID)
SUBURB (Postcode, SuburbName)
INVOICE (InvoiceNo, Amount, JobID)
SEMINAR (SeminarID, SeminarTitle, SeminarDataTime,
SeminarVenue)
QUOTATION (JobID, ABNNumber, QuoteAmount)
BUSINESS_INDUSTRY (ABNNumber, IndustryID)
ADJACENT_SUBURB (PostCode, AdjacentPostCode)
ELITE_MEMBER (EliteMemberID)
SEMINAR_ATTENDIES (EliteMemberID, SeminarID)
NOTE: PK is printed underlined and FK is printed italic in
italics.