Question: I am not sure how to create the trigger in mysql CREATE TRIGGER Customer_Order...... Refer to Figure Q3a for the data model for food order.


I am not sure how to create the trigger in mysql
CREATE TRIGGER Customer_Order......
Refer to Figure Q3a for the data model for food order. FoodOrder consist of orderNumber datetimeVisit tableNumber numPax OrderItem orderNumber orderItemNo MenuItemSize isFor dishid + size price MenuItem refersto th dishid di shName Figure Q3a(i) Write a trigger to ensure that customers can order each dish not more than THREE (3) times, regardless of dish size, so as to encourage variety in each food order. Furthermore, if the time of visit is after 2.50pm or after 9.50 pm, the number of dishes ordered is not TWO (2) or more than the number of customers being served for an order. Include appropriate informational messages and error messages where appropriate. Refer to Figure Q3a for the data model for food order. FoodOrder consist of orderNumber datetimeVisit tableNumber numPax OrderItem orderNumber orderItemNo MenuItemSize isFor dishid + size price MenuItem refersto th dishid di shName Figure Q3a(i) Write a trigger to ensure that customers can order each dish not more than THREE (3) times, regardless of dish size, so as to encourage variety in each food order. Furthermore, if the time of visit is after 2.50pm or after 9.50 pm, the number of dishes ordered is not TWO (2) or more than the number of customers being served for an order. Include appropriate informational messages and error messages where appropriate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
