Assignment 4 Part 2 Solution

$30.00 $24.00

Create two triggers that work with the SQL tables from the lab 1. (30 points [15 points each]) Create `update_balance_trigger` on the ​transaction​table. The trigger will be used (triggered) to update the current balance of the credit card by adding the dollar amount of a transaction every time a tuple is inserted into the transaction…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Create two triggers that work with the SQL tables from the lab 1. (30 points [15 points each])

  1. Create `update_balance_trigger` on the transactiontable. The trigger will be used (triggered) to update the current balance of the credit card by adding the dollar amount of a transaction every time a tuple is inserted into the transaction table.

  1. Create `check_balance_trigger` on the credit cardtable. If a credit cardtuple is updated, then the trigger should make sure that the new credit card balance is less than the new credit limit. If it is not, then you should signal the exception 12345.

Make sure your triggers work on the MySQL database. Submit only the code for the two triggers.

Submission

Please submit your work as a sql file to polylearn.

Assignment 4 Part 2 Solution
$30.00 $24.00