DBM405 Lab 5 User Defined Database Triggers
download
Step 1: Creating the First Trigger
The first trigger you are going to create is to be named RENTING_MOVIE and is going to take care of the process of
updating the mm_movie table to reflect a change...
More
DBM405 Lab 5 User Defined Database Triggers
download
Step 1: Creating the First Trigger
The first trigger you are going to create is to be named RENTING_MOVIE and is going to take care of the process of
updating the mm_movie table to reflect a change downward in the quantity column for a movie when it is rented. Keep
the following in mind:
1. The trigger needs to be an AFTER INSERT trigger on the mm_rental table. We want it to be an AFTER trigger so that,
in case there are any exceptions raised, the trigger will not fire.
2. The trigger needs to be able to fire for each row that is inserted into the table.
3. The trigger process will only involve the update statement to lessen the quantity amount in the mm_movie table by
one for the referenced movie ID.
Test your code by running the script in SQL*Plus. If you have any errors, debug them and once you have a clean
compile, move on to Step 2.
Step 2: Creating the Second Trigger
The second trigger you are going to create is to be named RET
Less