Data Modeling easy
What does the 'Atomicity' property in ACID transactions guarantee?
- A It guarantees that all distinct operations within a transaction either complete successfully as a single unit or fail entirely with no side effects.
- B It ensures that concurrent transactions are executed in a serializable manner, preventing one process from reading the uncommitted state of another.
- C It provides a low-latency guarantee that data is synchronized across all geographically distributed read-replicas within a few milliseconds.
- D It utilizes high-precision atomic clocks to provide a monotonic timestamp for every single write operation across a globally distributed cluster.
Answer: A. It guarantees that all distinct operations within a transaction either complete successfully as a single unit or fail entirely with no side effects.
Atomicity follows the 'All or Nothing' principle. It ensures that if a system crash or error occurs mid-transaction, the database returns to the exact state it was in before the transaction began. A classic example is a multi-step bank transfer: if the debit succeeds but the credit fails, the entire operation is rolled back to prevent money from simply disappearing.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- When modeling a Distributed Transaction using the Saga Pattern (Choreography or Orchestration), what type of consistency do you achieve?
- Which practice prevents SQL Injection attacks?
- What is 'Bi-Temporal' data modeling (e.g., in SQL:2011 standard)?
- Adding an Index to a database column generally improves Read performance. What is the negative trade-off?
- Log Systems Merge (LSM) Trees (used in RocksDB, Cassandra) optimize for fast writes. What is their primary downside regarding Disk I/O?
- What is the primary objective of normalizing a relational database schema (e.g., to 3NF)?