Session Ready
Exercise

Savepoint's effect on isolation levels

Now that you've explored savepoints, let's use them to set up a series of transactions that all need to work from the same initial snapshot of the data. REPEATABLE READ is an isolation level that enables us to give each statement inside the transaction the same data as the first statement operated on instead of the data as a result of the prior statement(s).

Recently, the FFEIC allowed for a progressive curtailment of foreign deposits, field RCON2203 in thousands, in the dataset. The new curtailment is 35% for more than $1 billion, 25% for more than $500 million, and 13% for more than $300 million. It's possible to order these statements to avoid reducing the data more than once. However, statements have the data before any adjustments with REPEATABLE READ.

Instructions
100 XP
  • Start a REPEATABLE READ transaction.
  • Reduce RCON2203 by 35% if more than $1 billion, by 25% if more than $500 million, or by 13% if more than $300 million with a SAVEPOINT after each.
  • Close the transaction.
  • Total the RCON2203 field.