Question: (0) Write a trigger to ensure that if a customer has caused more than 3 damages in the past12 months, there must be a period

(0) Write a trigger to ensure that if a customer has caused more than 3 damages in the past12 months, there must be a period of one month from the date when the last damaged equipment was returned before he can make another loan. For example, if a customer wishes to loan an equipment on the 2 August 2021, but in the period August 2, 2020 to August 2, 2021, there are three damages caused by the customer. If the third damaged equipment was returned on or before the 1 July 2021, the customer can make the loan. If the third damaged equipment was returned after the 1 July 2021, the loan request should be rejected. Furthermore, assume the third damaged equipment was returned in July 2021, he is limited to one loan per calendar month for a year from the date when the last damaged equipment was returned, that is, from August 2021 to July 2022, a maximum of one loan per month should be enforced. If a loan goes beyond a month, for example, the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
