Bird
Raised Fist0
HLDsystem_design~20 mins

ACID properties in HLD - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
ACID Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Which ACID property ensures that a transaction is completed fully or not at all?
In database systems, transactions must be reliable. Which ACID property guarantees that either all steps of a transaction happen or none do, preventing partial updates?
ADurability
BAtomicity
CConsistency
DIsolation
Attempts:
2 left
💡 Hint
Think about the property that treats the transaction as a single unit.
❓ Architecture
intermediate
1:30remaining
Which ACID property prevents transactions from interfering with each other?
When multiple users access a database at the same time, which ACID property ensures their transactions do not affect each other's results?
AAtomicity
BDurability
CIsolation
DConsistency
Attempts:
2 left
💡 Hint
Think about how transactions are kept separate during execution.
❓ scaling
advanced
2:00remaining
In a distributed database, which ACID property is hardest to maintain when scaling horizontally?
When a database is spread across many servers to handle more users, which ACID property becomes most challenging to guarantee?
ADurability
BAtomicity
CIsolation
DConsistency
Attempts:
2 left
💡 Hint
Consider the difficulty of keeping data the same everywhere at the same time.
❓ tradeoff
advanced
2:00remaining
Which ACID property can be relaxed to improve database performance but risks reading uncommitted data?
To speed up database operations, sometimes one ACID property is weakened. Which one is it, and what risk does this introduce?
AIsolation; risk of dirty reads
BAtomicity; risk of partial transactions
CDurability; risk of losing committed data
DConsistency; risk of invalid data
Attempts:
2 left
💡 Hint
Think about concurrency and seeing changes before they are finalized.
❓ estimation
expert
2:30remaining
Estimate the minimum number of replicas needed to ensure Durability in a distributed database with potential node failures.
You want to guarantee that committed data is never lost even if some servers fail. What is the minimum number of replicas you need to store the data safely?
A3 replicas, to tolerate one server failure and maintain quorum
B2 replicas, to tolerate one server failure
C1 replica, because one copy is enough if the server is reliable
D4 replicas, to tolerate two server failures
Attempts:
2 left
💡 Hint
Think about how many copies are needed to survive one failure and still agree on data.

Practice

(1/5)
1. Which of the following ACID properties ensures that a transaction is completed fully or not at all, preventing partial updates?
easy
A. Atomicity
B. Consistency
C. Isolation
D. Durability

Solution

  1. Step 1: Understand Atomicity in ACID

    Atomicity means a transaction is treated as a single unit. It either happens completely or not at all.
  2. Step 2: Compare with other properties

    Consistency ensures data correctness, Isolation manages concurrent transactions, Durability guarantees data persistence after commit.
  3. Final Answer:

    Atomicity -> Option A
  4. Quick Check:

    Atomicity = All or nothing [OK]
Hint: Atomicity means all steps succeed or none do [OK]
Common Mistakes:
  • Confusing Atomicity with Consistency
  • Thinking Isolation means no partial updates
  • Mixing Durability with Atomicity
2. Which ACID property is correctly described by this statement: Once a transaction commits, its changes are permanent even if the system crashes.
easy
A. Isolation
B. Atomicity
C. Durability
D. Consistency

Solution

  1. Step 1: Identify property about permanence after commit

    Durability guarantees that once a transaction commits, changes survive crashes.
  2. Step 2: Check other properties

    Isolation controls concurrent access, Atomicity ensures all-or-nothing, Consistency maintains valid data states.
  3. Final Answer:

    Durability -> Option C
  4. Quick Check:

    Durability = Permanent changes after commit [OK]
Hint: Durability means changes survive crashes [OK]
Common Mistakes:
  • Mixing Durability with Atomicity
  • Confusing Isolation with Durability
  • Thinking Consistency means permanence
3. Consider two transactions T1 and T2 running concurrently. T1 reads a value, T2 updates it and commits. Which ACID property ensures T1 does not see T2's partial changes before commit?
medium
A. Isolation
B. Durability
C. Atomicity
D. Consistency

Solution

  1. Step 1: Understand concurrent transaction behavior

    Isolation ensures transactions do not interfere and see only committed data.
  2. Step 2: Relate to other properties

    Atomicity is about all-or-nothing, Durability about permanence, Consistency about valid data states.
  3. Final Answer:

    Isolation -> Option A
  4. Quick Check:

    Isolation = No dirty reads [OK]
Hint: Isolation prevents seeing uncommitted changes [OK]
Common Mistakes:
  • Confusing Isolation with Atomicity
  • Assuming Consistency controls concurrency
  • Mixing Durability with Isolation
4. A developer notices that after a system crash, some committed transactions are lost. Which ACID property is most likely violated?
medium
A. Atomicity
B. Consistency
C. Isolation
D. Durability

Solution

  1. Step 1: Identify property related to crash recovery

    Durability ensures committed transactions survive crashes.
  2. Step 2: Analyze the problem

    Lost committed transactions after crash means Durability is violated.
  3. Final Answer:

    Durability -> Option D
  4. Quick Check:

    Durability = No data loss after crash [OK]
Hint: Lost commits after crash means Durability failure [OK]
Common Mistakes:
  • Blaming Atomicity for crash data loss
  • Confusing Isolation with crash recovery
  • Assuming Consistency fixes crash issues
5. You design a banking system where multiple users transfer money concurrently. Which combination of ACID properties is most critical to prevent incorrect balances and lost updates?
hard
A. Consistency and Durability
B. Atomicity and Isolation
C. Isolation and Durability
D. Atomicity and Consistency

Solution

  1. Step 1: Identify needs for concurrent money transfers

    Atomicity ensures each transfer completes fully or not at all, preventing partial money moves.
  2. Step 2: Ensure no interference between concurrent transfers

    Isolation prevents transactions from seeing intermediate states, avoiding lost updates and incorrect balances.
  3. Step 3: Evaluate other properties

    Consistency ensures valid data but depends on Atomicity and Isolation; Durability ensures persistence but not concurrency control.
  4. Final Answer:

    Atomicity and Isolation -> Option B
  5. Quick Check:

    Atomicity + Isolation = Safe concurrent transfers [OK]
Hint: Atomicity + Isolation prevent partial and conflicting updates [OK]
Common Mistakes:
  • Ignoring Isolation leads to lost updates
  • Assuming Consistency alone prevents concurrency issues
  • Overlooking Atomicity causes partial transfers
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard