Skip to content

CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Database Management

A fintech firm in Pune executes the following in sequence: INSERT of a new loan record, then SAVEPOINT s1, then UPDATE of the interest rate, then ROLLBACK TO s1. Which statement correctly describes the state of the database afterwards, in the transaction still open?

The insert remains pending within the open transaction while the update is undone. Rolling back to a savepoint reverses only changes made after that savepoint, and the earlier insert stays uncommitted until a COMMIT is issued. Nothing has been permanently committed yet.

  1. ABoth the insert and the update are undone
  2. BThe insert remains pending in the transaction, while the update is undoneCorrect
  3. CThe insert is undone, while the update remains pending
  4. DBoth the insert and the update are permanently committed

Explanation

ROLLBACK TO a savepoint undoes only changes made after that savepoint. The UPDATE came after s1 and is undone; the INSERT came before s1 and remains part of the open transaction, not yet committed. Nothing is permanent until COMMIT, so the commit option is wrong.

Did you get it right without looking?

One question tells you little. A timed set on Database Management shows your real accuracy, how long you take and where you lose marks.

More Database Management questions