CSC365 Project4 Solved

35.00 $

Category:

Description

Rate this product

Q1. Create the precedence graph for the schedule: w​1(X), r​1(X), w​2(Y), r​3(X), w​1(Y), w​1(X). Based on the graph, determine whether the schedule is conflict-serializable.

Q2. What is the difference between serializable and conflict-serializable schedule. What is the relation between the two (is one of them a subset of the other)?

Q3. Consider the following schedule:

r​1(A);r​2(B);???;w​1(C);w​2(A);

What value for ??? will make the schedule not conflict-serializable. Give one such possible value.

Q4[. Consider the transactions ​T​1 and T​2.

T​1 :r​1(A​); ​w​1(A​); ​r​1(B​); ​w​1(B​);

T​2 : r​2(B​); ​w​2(B​); r​​2( ​A​); ​w​2(A​);

Give an example of a conflict-serializable schedule and non conflict-serializable schedule for the eight actions.

Q5 Are the following schedules conflict-serializable?

  1. r​1(A​); ​w​1(B); ​r​2(B); w​​2( C);​ r​3(C); ​w​3(A);
  2. w​3(A​); ​r​1(A); ​w​1(B); r​​2( B);​ w​2(C); ​r​3(C);

Create two triggers that work with the SQL tables from the lab 1.

  1. Create `update_balance_trigger` on the ​transaction​ 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.
  2. Create `check_balance_trigger` on the ​credit card​ If a ​credit card​ tuple 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.

  • Project4-xtngka.zip