Online worksheet ยท 1 of 4

Related changes should succeed together - Online practice 1

Read the information, then answer the questions. An adult may read the instructions aloud. Show your working where asked.

Read before answering

Isolated reservation model: places=2, enrolments=0. One operation must reduce places by 1 AND create one enrolment together. A failure is injected after the place update but before the enrolment insert. Then a fresh successful attempt performs both steps. These are invented in-memory records, not production instructions.

Worksheet preview

  1. Starting with 2 places and 0 enrolments, what should be stored after the failed transaction rolls back?
  2. What should be stored after the later successful transaction? State the consistency rule.
  3. Would the database rollback automatically undo an already-sent email? What does a transaction not replace?

This exercise is included in the free preview. Register free to complete it and download the preview PDFs. No payment is required.

Register free

Already registered? Sign in