Question: Create a database trigger for the following situations: (a) The price of all double rooms must be greater than 100. (b) The price of double

Create a database trigger for the following situations:
(a) The price of all double rooms must be greater than £100.
(b) The price of double rooms must be greater than the price of the highest single room.
(c) A booking cannot be for a hotel room that is already booked for any of the specified dates.
(d) A guest cannot make two bookings with overlapping dates.
(e) Maintain an audit table with the names and addresses of all guests who make bookings for hotels in London (do not store duplicate guest details).

Step by Step Solution

3.30 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a CREATE TRIGGER DouleRoomPrice BEFORE INSERT ON Room FOR EACH ROW WHEN newtype D AND newprice 100 B... 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 (1 attachment)

Word file Icon

672-CS-DB (1295).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!