Question: pl/sql within the oracle environment utlize the travel anywhere database to create a database trigger hotel_kids_rule to enforce a business rule. when inserting a hotel_reservation,
pl/sql within the oracle environment
utlize the travel anywhere database to create a database trigger "hotel_kids_rule" to enforce a business rule. when inserting a hotel_reservation, if the num_kids value is more than zero, then assign the bed_type DQ to the reservation. save the trigger source as a sript file.
For example, the trigger will change the bed_type for the following insert statement. insert into hotel_reservation (reserve_no,reserve_date,arrival_date,dep_date,num_adults,num_kids,customer_id,hotel_id,bed_type,rooms) values(hotel_reserve_sequence.nextval,sysdate,sysdate+5,sysdate+7,1,2,101,19,'DT',1); For example, the trigger will not change the bed_type for the following insert statement. insert into hotel_reservation (reserve_no,reserve_date,arrival_date,dep_date,num_adults,num_kids,customer_id,hotel_id,bed_type,rooms) values(hotel_reserve_sequence.nextval,sysdate,sysdate+5,sysdate+7,2,0,102,20,'DT',1);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
