Quick revision
The short answer
I would decide by the cost of an anomaly, not by the technology. Money, inventory, entitlements and legal records keep strict transactional invariants; feeds, analytics and caches can accept eventual consistency. Every proposal must state its invariants in writing and show what protects each one, scaling options that keep ACID come first, and where weaker stores are used we require compensating designs such as idempotency keys, reconciliation and sagas. Architecture decision records, reconciliation reports and incident reviews govern it, and because teams rarely reason correctly about eventual consistency, the default stays transactional.
What to remember
In this answer, we saw how to decide at company level which data needs full ACID transactions. We classify data by the cost of an anomaly, require every proposal to state its invariants and how each is protected, prefer scaling options that keep transactions, such as replicas, partitioning and distributed SQL, and require idempotency keys, sagas, reconciliation and audit wherever weaker stores are used. Decision records, reconciliation reports and incident reviews govern the policy, and because eventual consistency is hard for people to reason about, the default stays transactional.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would decide by the cost of an anomaly, not by the technology. Money, inventory, entitlements and legal records keep strict transactional invariants; feeds, analytics and caches can accept eventual consistency. Every proposal must state its invariants in writing and show what protects each one, scaling options that keep ACID come first, and where weaker stores are used we require compensating designs such as idempotency keys, reconciliation and sagas. Architecture decision records, reconciliation reports and incident reviews govern it, and because teams rarely reason correctly about eventual consistency, the default stays transactional.
Why this question is asked
Proposals to move off a relational database usually arrive with a strong argument, cost or scale, and a weak one about what happens to correctness. At company level, the risk is that each proposal is judged alone and, over a few years, critical data ends up in stores that cannot protect it. Interviewers ask this to see whether a senior engineer can set a principled policy that still lets teams scale. In this answer, we will classify data by anomaly cost, demand invariants in writing, exhaust ACID-preserving options, require compensating designs where we give up transactions, set up governance, and account for the human cost.
1Classify Data by the Cost of an Anomaly
An anomaly is a result that could not happen if transactions ran one at a time: a double spend, an oversold item, a booking accepted twice. The question for each kind of data is what such an anomaly costs. For a ledger it is lost money, regulatory trouble and customer trust. For a recommendation feed, a stale item for a few seconds costs nothing measurable.
So I would sort data into a few classes with a default guarantee for each, and let teams argue for an exception with evidence rather than start from a blank page each time.
| Data class | Examples | Default guarantee |
|---|---|---|
| Money and ledgers | balances, payments, invoices | ACID, strict isolation for invariants |
| Scarce resources | inventory, seats, bookings | ACID or single-writer per resource |
| Entitlements and legal | licences, consents, audit records | ACID, append-only history |
| User content | profiles, comments | ACID preferred, replicas for reads |
| Derived and disposable | feeds, analytics, caches, search | eventual consistency is fine |
Notice that the classification follows the data, not the team or the service. A service that owns both a ledger and a feed stores them with different guarantees.
2Ask for the Invariants in Writing
An invariant is a rule that must always hold, such as no negative balance, no double booking of a seat, or every payment matched to exactly one invoice. Every proposal to move a system must list its invariants and show, for each one, what protects it in the new design: a uniqueness constraint, a conditional write, a serializable transaction, a single writer per key, or a reconciliation process that detects and repairs violations.
This turns a vague debate into a concrete review. A proposal that only says 'it scales better' is rejected, not because the store is bad, but because nobody has shown that the rules survive. Often the exercise itself reveals that the team needs a conditional write or a transaction the new store does not offer.
3Prefer Scaling Options That Keep ACID
Giving up transactions should be the last step, not the first, because there is a lot of room before it. Read replicas take read load off the primary. Partitioning keeps tables and indexes manageable. Better schema and query design often removes the bottleneck that started the discussion. Moving cold data out shrinks the hot working set. And distributed SQL databases, which shard data across nodes while offering serializable or snapshot isolation, can scale writes horizontally while keeping transactions, at the price of higher latency per transaction and a new system to operate.
Only when these options cannot meet the requirements, with numbers to show it, do we accept a store with weaker guarantees for a class of data that can tolerate it.
4Compensating Designs Where Guarantees Are Weaker
When a system does use a store without multi-record transactions, the design must handle what the database no longer does. Idempotency keys make every operation safe to retry, because the client's key identifies the operation and duplicates are ignored. Sagas break a business process into local steps, each with an explicit compensating action, such as releasing a reservation if payment fails. Reconciliation jobs compare the system with an independent record, such as the payment provider's report, and flag differences. Audit trails record every change so a discrepancy can be explained.
- Data class allows eventual consistency?YesCheck invariantsNoKeep ACID, scale another way
- Every invariant has a written protection?YesCheck scaling optionsNoReject until it does
- ACID-preserving scaling exhausted?YesRequire compensationsNoTry replicas, partitioning, distributed SQL
- Idempotency, sagas, reconciliation designed?YesApprove with ADRNoReturn for design
4 steps in order. Play them, or step through them one at a time.
Each 'no' sends the proposal back with a specific reason.
The point of requiring these up front is that teams often discover that the compensations are a large part of the work, which changes the cost comparison that motivated the move.
5Governance and the Human Cost
Each decision is recorded in an architecture decision record: the data class, the invariants, the chosen guarantees, the compensations and who owns them. Reconciliation reports run periodically and their discrepancy counts are visible. Incident reviews classify data anomalies as their own category with a cost estimate, so the organisation can see whether weaker guarantees are paying for themselves.
Finally, the human cost decides the default. Reasoning about eventual consistency is hard: retries, reordering, partial failures and stale reads interact in ways that even experienced engineers get wrong, and the bugs are rare and hard to reproduce. Transactions let ordinary code be correct by default. So the default stays transactional, and teams that want something weaker carry the burden of proof.
6Follow-up questions
How would you measure the business cost of anomalies?
Count and value them: reconciliation discrepancies multiplied by their monetary value, refunds and credits issued because of data errors, support tickets traced to inconsistencies, engineer time spent on manual repairs, and any regulatory findings. Collected per quarter, these figures can be weighed against the infrastructure savings a weaker store promised.
When is a distributed SQL database worth its price?
When a dataset with strong invariants has outgrown a single primary's write capacity or needs multi-region availability, and partitioning or splitting by domain cannot solve it. The price is higher per-transaction latency, licence or managed service cost and new operational skills, so it suits a few core systems rather than being the default for everything.
What if a team has already moved critical data to a weak store?
Treat it as risk to be managed: document its invariants, add reconciliation against an independent source immediately, add idempotency where missing, and plan either compensations or a move back, prioritised by the cost of an anomaly in that data.
7Conclusion
In this answer, we saw how to decide at company level which data needs full ACID transactions. We classify data by the cost of an anomaly, require every proposal to state its invariants and how each is protected, prefer scaling options that keep transactions, such as replicas, partitioning and distributed SQL, and require idempotency keys, sagas, reconciliation and audit wherever weaker stores are used. Decision records, reconciliation reports and incident reviews govern the policy, and because eventual consistency is hard for people to reason about, the default stays transactional.
Open with
I would make the decision about data, not about databases. First I classify data by what an anomaly costs. Money, ledgers, inventory, bookings, entitlements and legal records need strict invariants, so ACID transactions by default.
Then, if they want more
Feeds, analytics, search and caches can be eventually consistent. Then I ask every proposal to write down its invariants, like no negative balance or no double booking, and show what protects each one in the new design, a conditional write, a unique constraint, a serializable transaction, a single writer per key or reconciliation.
A proposal that only says it scales is not enough. Before giving up transactions, I want to see that ACID-preserving options were tried: read replicas, partitioning, query and schema fixes, archiving, or a distributed SQL database with serializable or snapshot isolation.
Where we do accept a weaker store, I require compensating designs up front: idempotency keys for retries, sagas with explicit compensation, reconciliation jobs against an independent source, and audit trails. Each decision gets an architecture decision record, reconciliation reports are visible, and incident reviews track data anomalies as a cost so we can compare them with the savings.
And I keep the default transactional, because in my experience most teams do not reason correctly about eventual consistency, and those bugs are rare, expensive and hard to reproduce.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- PostgreSQL documentation, MySQL reference manual
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Your company runs core ledgers on a relational database, and several product teams now...": https://scrivio-interview-library.netlify.app/databases/acid-and-isolation/36ec5d4db2/