AlgoViz

ACID: atomicity and durability

medium 26 min

A transaction turns several changes into one: all of them happen or none do, and once committed they survive a crash.

What each level should show

The same question is judged differently for mid, senior and staff.

  • Mid

    Must show

    • Explains the four letters
    • Puts a transaction around related changes
    • Knows log first, data later

    Will be probed on

    • Commit against rollback
    • What a constraint can check

    Stands out

    Checks the row count of an update.

  • Senior

    Must show

    • Explains redo and undo
    • Uses an outbox
    • Names what durability does not cover

    Will be probed on

    • Group commit
    • Recovery time
    • Two-phase commit blocking

    Stands out

    Separates atomicity from isolation clearly.

  • Staff

    Must show

    • Chooses a durability setting per kind of data
    • Draws transaction borders around services
    • Plans repair and reconciliation

    Will be probed on

    • Cost of synchronous replication
    • Long transactions in production

    Stands out

    Designs data so that one transaction in one place is enough.