DATABASE
    intermediate

    ACID Transactions

    Software Engineer path · lesson 52 of 99

    A transfer of $50 from A to B requires two writes: debit A, then credit B. Toggle the crash to see what happens if the server dies between them.

    Simulate crash between writes:no crash
    Account A
    $200
    Account B
    $100
    Ready — press Run Transfer

    Which letter of ACID?

    Sort

    Sort each guarantee into the ACID property it describes.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Atomicity

    Drop items here

    Consistency

    Drop items here

    Isolation

    Drop items here

    Durability

    Drop items here
    5 pieces left to place

    Test your knowledge

    20 questions
    Question 1 of 20
    Score: 0

    A bank transfer debits Account A successfully but the server crashes before crediting Account B. $50 disappears. Which ACID property, if enforced, would have prevented this?

    The short version

    Think of a bank teller processing your wire transfer: either the full transfer happens (money leaves your account AND arrives in theirs) or nothing happens at all — the teller never leaves you with money missing from both sides.

    Interview Questions

    Amazon
    Shopify
    Stripe
    Google
    Meta
    Oracle
    Stripe
    Uber
    Netflix

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required