Search
Lessons (29)
- ACID, Transactions & Locks
Make multi-step changes correct with atomic transactions, isolation choices, constraints and short-lived locks. The bank-transfer …
- Transactions, Indexes & Concurrency
… transactions protect invariants while indexes speed access and locks coordinate writers](/img/database-interviews/transactions.svg) Q8: What …
- Time, Consistency and Distributed Transactions
Reason about clocks, ordering, split brain, locks, CRDTs and transactions without promising impossible global certainty. ![Distributed correctness: clocks …
- Delivery Guarantees: At-Most, At-Least & Exactly Once
Can a message be lost? Delivered twice? Learn Kafka's three delivery semantics, idempotent producers, transactions for read …
- Database Indexing & Transactions
… retry the transaction Transaction tips - Keep transactions short. Never wait for an HTTP call or user input inside …
- Data in Microservices: Sagas & the Outbox Pattern
Each service owns its database, so how do you keep data consistent across services without a shared transaction …
- Storage Engines & Database Operations
… Bound pool size, reserve capacity for critical traffic, set deadlines and investigate long transactions or slow queries. Backups …
- SQL vs NoSQL Databases
… catches bad data, JOINs answer complex questions, ACID transactions keep money and inventory correct, and SQL is a …
- What Is Software Architecture?
… Use PostgreSQL for the orders service Status Accepted (2026-09-28) Context Orders need multi-row transactions (order …
- Domain-Driven Design: Tactical Patterns
… keeps boundaries clear 4. Use eventual consistency between aggregates One transaction changes one aggregate; others react to domain …
- Design an E-Commerce Checkout
… Do not hold a database transaction open across payment. Handle unknown provider outcomes through reconciliation; expire reservations; isolate …
- Design a Reliable Notification System
… Enforce consent/preferences before enqueueing, and isolate transactional from marketing traffic. Workers send and record provider ID plus …
- Real-Time, Pub/Sub, Webhooks and CDC
… CDC Publish committed database changes Use an outbox/transaction log, not app guesses Delivery is usually at-least …
- SQL Interview Query Drills
… cleanup, decide which row to keep in a transaction and add a unique constraint to prevent recurrence. Q25 …
- Views, Triggers & Stored Procedures
… inputs. A trigger runs automatically from an event. Transaction-control and return-value capabilities vary by engine, so …
- Finding Service Boundaries with DDD
… consistency boundaries An aggregate is a group of objects that must stay consistent together , changed in one transaction …
- SQL Language, Identifiers & Data Types
… Many systems call COMMIT and ROLLBACK transaction-control statements. Q7: Identity, sequence and UUID An identity/auto-increment …
- Exactly-Once Payment Processing
… A database transaction cannot include that network call. Unsafe Safe --- --- Check key → call provider → save Atomically create/get …
- DBMS Foundations, Keys & Normalization
… Why DBMS instead of files? A DBMS centralizes data, supports concurrent access, transactions, constraints, authorization, backup/recovery and …
- Replication, Partitioning & Sharding
… Cross-shard joins and transactions are expensive. Prefer colocating related data, asynchronous aggregates and explicit workflows. Do not …
- Monolith vs Microservices
… function calls ❌ Slow, unreliable network calls Transactions ✅ One ACID database transaction ❌ Sagas, eventual consistency Testing end to end …
- CQRS & Event Sourcing
… It stores every transaction : deposit $100, withdraw $30, deposit $50. The balance is simply the sum. You can …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… Capture (CDC) with Debezium reads the database's transaction log and turns every insert, update and delete into …
- Message Queues & RabbitMQ
… properties.messageId)) return channel.ack(msg); await db.transaction(async (tx) = { await doTheWork(tx, job); await tx.processedMessages …
- Event-Driven Architecture
… include versions/timestamps Lost events when saving + publishing Transactional outbox pattern Hard to debug "what happened?" Correlation IDs …
- Scaling, Load Balancing & Rate Limiting
… Adding shards moves data. Consistent hashing minimises that Transactions across shards Hard; avoid them by design Rate limiting …
- Normalization & Denormalization
… The event/transactional outbox or refresh job that updates the copy. 3. Acceptable freshness delay. 4. Rebuild and …
- Vertical Slice Architecture & the Modular Monolith
… In-process (fast, reliable) Network (slow, can fail) Transactions ✅ Easy ✅ Easy within a module ❌ Sagas Operational complexity ✅ Low …
- Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor
… in Google Docs, Redux DevTools time travel, database transactions (rollback). 💡 Memento vs Command for undo: Memento stores snapshots …