All 160 questions
What are the ACID properties of database transactions?
Asked in 15 of 612 interviews · last asked Oct 12 · Concept · Junior
Show answer
ACID stands for atomicity, consistency, isolation, and durability. Atomicity means all changes succeed or none do; consistency means transactions preserve database rules. Isolation controls how concurrent transactions affect each other, depending on the isolation level. Durability means committed changes survive a crash.
- A transaction groups database operations into one unit of work.
- Consistency depends on both database constraints and correct transaction logic.
- Serializable isolation makes concurrent transactions behave as if they ran one at a time.
CodeTo transfer money between two accounts: Begin a transaction. Subtract the amount from the source account. Add the same amount to the destination account. Commit if both steps succeed; otherwise roll back.What the interviewer checks: The interviewer checks whether you understand how transactions protect data during failures and concurrent work.
Common mistake (in 4 of 6 reviewed answers): Many answers forget that all four properties need definitions, not just their names.
Other ways it was asked
- “What are the ACID properties in database transactions?”
- “What does ACID mean in the context of databases?”
- “What are ACID properties?”
How would you make payment processing idempotent so retries cannot create duplicate charges or credits?
Asked in 8 of 612 interviews · last asked Oct 22 · Design · Senior
Show answer
Require a stable idempotency key for each payment, reused on retries. Store it durably with a unique constraint, and commit internal credits and the saved result in one database transaction. Return the saved result for completed retries; reject changed payment details. For external charges, reuse the provider’s idempotency key and reconcile uncertain outcomes before trying again.
- Scope the unique key by merchant and operation; identical amounts alone do not identify duplicates.
- Store the request details or hash, processing status, and response alongside the key.
- Use the unique constraint to handle concurrent requests; report pending status while the original payment is unfinished.
- Keep deduplication records through the retry window; without provider support, local transactions alone cannot prevent duplicate external charges.
What the interviewer checks: The interviewer checks whether retries, concurrent requests, and crashes remain safe across both database updates and external payments.
Other ways it was asked
- “If a service restarts and an external service resends the same message for a 50,000-peso payment, how would you prevent the recipient from receiving 100,000 pesos?”
- “If an external service resends the same 50,000-peso payment message after your service restarts, how would you prevent the recipient from receiving the payment twice?”
- “How would you design the system so that if a service restarts and an external service resends the same 50,000-peso credit message, the customer is not credited twice? How would you handle a late event indicating that the transaction is already settled or in an intermediate state?”
What is a database transaction, and when would you use one?
Asked in 6 of 612 interviews · last asked Oct 21 · Concept · Junior
Other ways it was asked
- “What is a database transaction?”
- “What are database transactions, and when would you use them?”
- “What are database transactions, and when should you use them?”
What is the difference between optimistic and pessimistic concurrency control?
Asked in 5 of 612 interviews · last asked Oct 12 · Concept · Mid-level
Other ways it was asked
- “What is the difference between pessimistic and optimistic locking?”
- “How do optimistic and pessimistic locking work?”
- “What is the difference between pessimistic locking and optimistic locking?”
In Spring, does @Transactional work when one method calls another @Transactional method in the same class?
Asked in 3 of 612 interviews · last asked Sep 1 · Concept · Senior
Other ways it was asked
- “If a method annotated with @Transactional is called from another method in the same class, will a transaction start?”
- “What happens in Spring when one transactional method calls another transactional method?”
What is a database deadlock, and why does it occur?
Asked in 3 of 612 interviews · last asked Oct 2 · Concept · Mid-level
Other ways it was asked
- “What is a database deadlock?”
What are the transaction isolation levels?
Asked in 2 of 612 interviews · last asked Mar 2 · Concept · Mid-level
Other ways it was asked
- “What is the highest transaction isolation level?”
How do you use transaction propagation in an application?
Asked in 2 of 612 interviews · last asked Oct 12 · Concept · Mid-level
Other ways it was asked
- “Can you explain transaction propagation?”
What are distributed transactions, and when would you use them?
Asked in 2 of 612 interviews · last asked Aug 19 · Concept · Mid-level
Other ways it was asked
- “What are some alternatives to distributed transactions?”
What is the use of the @Transactional annotation?
Asked in 2 of 612 interviews · last asked Oct 12 · Concept · Mid-level
Other ways it was asked
- “Why should we use the @Transactional annotation?”
- “What does the @Transactional annotation do in Spring, and what conditions must be met for it to work?”
How would you handle atomicity when updating both a cache and a database?
Asked once · last asked Mar 16 · Design · Senior
Other ways it was asked
- “How can you make an operation that updates both a cache and a database atomic?”
What is a serializable schedule, and how do you determine whether a schedule is serializable?
Asked once · last asked Oct 10 · Concept · Mid-level
Other ways it was asked
- “What is a serializable transaction schedule?”
How would you implement optimistic concurrency checking, for example with a timestamp or version?
Asked once · last asked Jan 28 · Scenario · Senior
How does PostgreSQL handle concurrent reads and writes?
Asked once · last asked Jan 28 · Concept · Senior
How would you handle two users concurrently changing the same account balance and ensure they see the latest value?
Asked once · last asked Jan 28 · Scenario · Senior
If an order is created but the inventory update fails, how can you ensure consistency and cancel or roll back the order?
Asked once · last asked Jan 30 · Scenario · Senior
How do you ensure data integrity across large distributed data systems or multiple databases, and what do you put in place to keep data accurate and consistent end to end?
Asked once · last asked Feb 24 · Scenario · Senior
In a relational database, how can you ensure that an operation is atomic?
Asked once · last asked Mar 2 · Concept · Mid-level
How does a database handle concurrent transactions, and what can help keep them isolated from each other?
Asked once · last asked Mar 2 · Concept · Mid-level
What is a non-repeatable read, and when can it be a problem?
Asked once · last asked Mar 2 · Concept · Mid-level
Does the repeatable read isolation level prevent phantom reads?
Asked once · last asked Mar 2 · Concept · Mid-level
What tools can you use to lock data in a database?
Asked once · last asked Mar 2 · Concept · Mid-level
How would you manage a transaction in a Spring method?
Asked once · last asked Mar 2 · Tooling · Mid-level
In a payment-card ordering and activation system, what does prioritizing consistency over availability mean?
Asked once · last asked Mar 16 · Concept · Senior
How would you keep a cache synchronized with a database?
Asked once · last asked Mar 16 · Design · Senior
How would you prevent duplicate records if a request with the same ID arrives after the database write but before the cache update?
Asked once · last asked Mar 16 · Scenario · Senior
How would you prevent concurrent orders from exceeding a customer's available funds or credit limit?
Asked once · last asked Mar 19 · Scenario · Senior
Other ways it was asked
- “How would you prevent multiple orders from exceeding a customer's £1,000 limit?”
- “How can two concurrent orders both be accepted when the customer has enough funds or limit for only one, and how would you prevent it?”
What MySQL locking or transaction strategies would you use to ensure data consistency when multiple PHP workers update the same rows concurrently?
Asked once · last asked Mar 26 · Scenario · Senior
Other ways it was asked
- “How do you ensure data consistency when multiple PHP workers may update the same rows concurrently? What locking or transaction strategies do you use in MySQL?”
In an MVC PHP app, where do you place transaction boundaries—controller, service layer, repository, or middleware—and why?
Asked once · last asked Mar 26 · Concept · Senior
How do you manage transactions in nested operations where one service calls another: propagate the same transaction context, use savepoints, or prevent inner services from opening transactions?
Asked once · last asked Mar 26 · Scenario · Senior
Other ways it was asked
- “How do you handle nested operations where one service calls another? Do you propagate the same transaction context, use savepoints, or prevent inner services from opening transactions?”
What is the Outbox pattern, and what problem does it solve?
Asked once · last asked Apr 2 · Concept · Mid-level
How would you ensure an order-created event is not lost and is eventually processed if a service restarts after the customer has received confirmation?
Asked once · last asked Apr 13 · Design · Senior
In Laravel, how would you enforce idempotency for a POST endpoint, such as creating a payment, to prevent duplicate processing during retries or timeouts?
Asked once · last asked May 5 · Scenario · Senior
How would you implement idempotency end to end? Where would you store the idempotency key, how would you validate it per user, and what would you return for a repeated request?
Asked once · last asked May 5 · Design · Senior
If a bank fund transfer shows as successful in the user interface but the database shows it was only partially debited, how would you investigate the case?
Asked once · last asked May 5 · Scenario · Senior
Imagine multiple users are simultaneously updating their profiles in a system. How would you handle concurrency to prevent data inconsistencies?
Asked once · last asked May 8 · Scenario · Mid-level
How do you manage transactions in Java Spring Boot?
Asked once · last asked May 13 · Tooling · Senior
How do you design transactional boundaries when a request touches aggregates or tables, and how do you handle partial failures in that context?
Asked once · last asked May 16 · Design · Senior
When a request involving multiple aggregates or tables partially fails, how do you handle rollback or compensating actions?
Asked once · last asked May 16 · Scenario · Senior
What do you consider important when managing database transactions?
Asked once · last asked May 21 · Concept · Mid-level
In PostgreSQL, how would you design an idempotency mechanism to process each event exactly once while still allowing safe retries?
Asked once · last asked May 29 · Design · Senior
How would you implement the conditional write or state-transition part in PostgreSQL under concurrency? What constraints or SQL pattern would you use to ensure only one worker can claim and process a given event ID?
Asked once · last asked May 29 · Scenario · Senior
For an idempotent event-processing workflow in PostgreSQL, when would you choose SERIALIZABLE isolation over READ COMMITTED with retries, and what failure mode would you expect to handle differently?
Asked once · last asked May 29 · Concept · Senior
How do you ensure data integrity in a financial system?
Asked once · last asked Jun 14 · Scenario · Mid-level
How would you implement transaction management in an application?
Asked once · last asked Jun 17 · Concept · Senior
How would you handle race conditions in order processing and payment flows?
Asked once · last asked Jun 18 · Scenario · Mid-level
Other ways it was asked
- “How would you prevent or resolve race conditions when processing orders?”
If only one unit of stock remains and two customers order at the same time, how would you prevent overselling, and when would you validate or lock the stock relative to publishing an event?
Asked once · last asked Jun 18 · Scenario · Senior
What is an example of a business operation that should be handled within a database transaction?
Asked once · last asked Jun 18 · Scenario · Mid-level
In a web application, what can happen when one user changes a value from A to B while another changes it to C and saves first, before the first user saves?
Asked once · last asked Jun 25 · Scenario · Mid-level
How would you prevent or handle conflicting updates when multiple users edit the same data?
Asked once · last asked Jun 25 · Scenario · Senior
How does Spring's @Transactional annotation open and close transactions?
Asked once · last asked Jun 25 · Concept · Senior
When refactoring a monolith into microservices, what objective criterion indicates that a proposed service boundary could create a distributed transaction problem?
Asked once · last asked Jul 16 · Design · Senior
How do you handle idempotency in a create endpoint, especially for retries, so you don't accidentally create duplicate resources?
Asked once · last asked Jul 16 · Scenario · Mid-level
Other ways it was asked
- “In the same create endpoint, how do you handle idempotency, especially for retries, so you don't accidentally create duplicate resources?”
How do you ensure the idempotency key check-and-create is atomic under concurrency, for example when two identical requests arrive at the same time across multiple instances?
Asked once · last asked Jul 16 · Scenario · Senior
During PostgreSQL constraint validation, what concurrency or blocking risks remain, and how would you monitor and mitigate them in production?
Asked once · last asked Jul 16 · Scenario · Senior
What locks does PostgreSQL take during ALTER TABLE VALIDATE CONSTRAINT, and what's one concrete mitigation you'd use if it contends with production traffic?
Asked once · last asked Jul 16 · Scenario · Senior
What are the risks of performing a backfill, validation, and setting a column to NOT NULL all within the same transaction?
Asked once · last asked Jul 16 · Scenario · Senior
How would you handle potential data consistency issues between Redis and PostgreSQL in a real-time bidding system?
Asked once · last asked Jun 29 · Scenario · Senior
How would you preserve the order of updates to Redis and PostgreSQL when using an asynchronous message queue?
Asked once · last asked Jun 29 · Scenario · Senior
How would you choose and validate an idempotency key for updates in PostgreSQL?
Asked once · last asked Jun 29 · Scenario · Mid-level
How would you use conditional updates and timestamp comparisons to resolve data conflicts?
Asked once · last asked Jun 29 · Scenario · Senior
How would you monitor and alert on data consistency issues between Redis and PostgreSQL?
Asked once · last asked Jun 29 · Scenario · Mid-level
Two APIs update orders and customers in separate databases: one updates orders first, while the other updates customers first. Why can this cause a deadlock?
Asked once · last asked Jul 16 · Scenario · Mid-level
How would you prevent or resolve a deadlock caused by concurrent API updates acquiring database locks in different orders?
Asked once · last asked Jul 16 · Scenario · Mid-level
How do database transactions work, and what are their limitations?
Asked once · last asked Jul 16 · Concept · Mid-level
How would you handle concurrent access to the same resource in a database?
Asked once · last asked Jul 16 · Scenario · Senior
How would you design a software architecture to ensure transactional atomicity?
Asked once · last asked Jul 19 · Design · Senior
Other ways it was asked
- “Can you describe the software architecture and explain how it ensures transactional atomicity?”
Why would you use optimistic concurrency with a version field instead of a lock, and how would you verify that it is wired end to end?
Asked once · last asked Jul 19 · Concept · Senior
What would happen if we use pessimistic locking in high concurrency systems?
Asked once · last asked Jul 19 · Concept · Senior
Can I roll back a TRUNCATE statement and a DELETE statement?
Asked once · last asked Jul 20 · Concept · Mid-level
What are transactions? While a transaction is running, what data does it see, and what do other transactions see of it?
Asked once · last asked Jul 23 · Concept · Mid-level
How do you prevent double deduction when the same payment request is retried?
Asked once · last asked Jul 27 · Scenario · Senior
In a banking application, a user submits a payment, the request times out without a response, and the user submits the same payment again. How would you prevent it from being processed twice?
Asked once · last asked Jul 31 · Scenario · Senior
How would you prevent inventory from going negative if two transactions simultaneously try to decrement the same stock?
Asked once · last asked Aug 4 · Scenario · Senior
How would you address performance degradation when checking and decrementing inventory within the same transaction?
Asked once · last asked Aug 4 · Scenario · Senior
How would you handle a significant increase in concurrent users during peak times while preventing seat double booking?
Asked once · last asked Aug 5 · Scenario · Senior
How do Ruby on Rails optimistic locking and a processed-event ID table work together to ensure idempotency when Sidekiq jobs are retried concurrently, and what should the write and update flow be?
Asked once · last asked Aug 11 · Concept · Senior
What stages does a database transaction go through, and at which stage is a change sent to a secondary replica?
Asked once · last asked Aug 21 · Concept · Senior
Is PostgreSQL using Raft for every transaction?
Asked once · last asked Aug 21 · Concept · Senior
In Python, how would you structure an idempotent external side-effecting step—for example, charging a card and writing to a database—to guarantee exactly-once behavior under retries and worker crashes?
Asked once · last asked Aug 24 · Design · Senior
How would you design a strongly consistent inventory reservation system that prevents overselling and handles thousands of reservations per second across many facilities?
Asked once · last asked Aug 24 · Design · Senior
If a facility goes down during an inventory reservation, how should the system behave on retry?
Asked once · last asked Aug 24 · Scenario · Senior
How does Snowflake ensure ACID compliance during concurrent write operations without using traditional database logs?
Asked once · last asked Aug 26 · Concept · Senior
How would you coordinate a webhook payload, a database write, and a queue when processing an incoming webhook?
Asked once · last asked Aug 26 · Design · Senior
What do the REQUIRED and REQUIRES_NEW propagation modes mean in a Spring transaction?
Asked once · last asked Sep 1 · Concept · Mid-level
How can you expire a 15-minute inventory reservation without using a background job?
Asked once · last asked Sep 2 · Scenario · Senior
When might inserting records in the batch worker before dispatching row-level jobs be a poor choice or fail?
Asked once · last asked Sep 2 · Scenario · Senior
How would you design idempotency for create-order POST requests and retries or refreshes, so flaky network connections don't create duplicate rows in PostgreSQL?
Asked once · last asked Sep 3 · Design · Senior
How would you enforce idempotency at the PostgreSQL level—with tables, constraints, and transactions—to prevent duplicates when concurrent requests reach multiple Node.js instances?
Asked once · last asked Sep 3 · Design · Senior
In Node.js and TypeScript, how would you handle a unique-constraint race where one request creates an order and another hits the constraint, including what the second request should do next?
Asked once · last asked Sep 3 · Scenario · Senior
Other ways it was asked
- “In Node.js and TypeScript, how would you structure the code to handle a unique-constraint violation race, where one request creates the order and another hits the constraint? What should the second request do next?”
How would you handle two users editing the same database record at the same time?
Asked once · last asked Sep 3 · Scenario · Senior
What is serializability in database transactions? Can you give an example?
Asked once · last asked Sep 4 · Concept · Mid-level
How would you design a bulk process for 2,000,000 rows that fails after 800,000 so it can restart safely without reprocessing completed rows?
Asked once · last asked Sep 4 · Design · Senior
How do you handle idempotency, failed transactions, duplicate requests, and database consistency in a payment flow?
Asked once · last asked Sep 4 · Scenario · Senior
How do you prevent double booking in Java when multiple users try to book the same item?
Asked once · last asked Sep 4 · Scenario · Mid-level
When two Celery workers process the same email after a Gemini request fails and retries, how could duplicate database writes or inconsistent state occur, and how would you prevent them without relying on a lock?
Asked once · last asked Sep 6 · Scenario · Senior
What are the Saga and transactional outbox patterns, and how do they address consistency in distributed transactions?
Asked once · last asked Sep 10 · Concept · Senior
How do you guarantee message ordering and idempotent deduplication across retries when publishing from the outbox?
Asked once · last asked Sep 11 · Design · Senior
What consistency trade-offs would you accept between ledger commit and event processing?
Asked once · last asked Sep 11 · Design · Senior
Other ways it was asked
- “What consistency tradeoffs did you accept between ledger commit and event processing?”
What are effective ways to handle many users accessing the database at the same time?
Asked once · last asked Sep 15 · Scenario · Mid-level
What happens in the backend when a customer makes a booking and pays, and how is the booking marked as confirmed?
Asked once · last asked Sep 16 · Design · Mid-level
How would you design the outbox table and locking strategy so multiple workers can process in parallel without breaking per-aggregate ordering?
Asked once · last asked Sep 16 · Design · Senior
How would you detect and recover from outbox failure modes, like DB commit succeeding but broker publish failing, or broker publish succeeding but DB update failing, without duplicates or reordering?
Asked once · last asked Sep 16 · Scenario · Senior
What does isolation mean in an ACID transaction?
Asked once · last asked Sep 17 · Concept · Mid-level
An Apex method updates records using partial-success DML: some records succeed and others fail. If an unhandled exception occurs later in the same transaction, what happens to the records that initially succeeded, and why?
Asked once · last asked Sep 17 · Concept · Senior
How would you ensure a payment is processed correctly when you need to update its status, credit tokens, and notify other services?
Asked once · last asked Sep 18 · Design · Senior
What would you do if the application crashed after writing to the database but before publishing the event?
Asked once · last asked Sep 18 · Scenario · Senior
How would you design the save operation when a Lightning Web Component allows users to edit a parent record and multiple child records together, handle validation errors, and decide whether partial success should be allowed?
Asked once · last asked Sep 18 · Design · Senior
If you are processing 1,000 records and only three are invalid, would you roll back the entire operation? How would you design the processing and error handling?
Asked once · last asked Sep 25 · Scenario · Senior
How would you prevent locking or performance problems when multiple users submit survey responses at the same time?
Asked once · last asked Sep 30 · Scenario · Mid-level
How does Spring Boot handle rollback when an operation involving multiple database tables fails, and what approaches can you use?
Asked once · last asked Sep 30 · Scenario · Mid-level
How do you manage a transaction that spans multiple databases in a Spring Boot application?
Asked once · last asked Sep 30 · Scenario · Senior
How would you design a background job, such as an inventory update or settlement job, to remain idempotent if it retries before the database update and completion status are recorded?
Asked once · last asked Oct 5 · Design · Senior
In a high-load Node.js service using PostgreSQL and Redis, how would you prevent race conditions, lost updates, cache inconsistencies, and deadlocks while ensuring correct results?
Asked once · last asked Oct 7 · Scenario · Senior
How would locations and seat locking work in a cinema ticket-booking system?
Asked once · last asked Oct 7 · Design · Mid-level
When would distributed transactions be appropriate in a file-ingestion pipeline that updates multiple database tables?
Asked once · last asked Oct 7 · Scenario · Senior
In Spring Boot, how would you commit an order creation to the database within a transaction?
Asked once · last asked Oct 9 · Tooling · Mid-level
In Spring, under what conditions does a transaction roll back for checked and unchecked exceptions?
Asked once · last asked Oct 9 · Concept · Mid-level
How would you design a system's business logic to prevent two pickers from being assigned a total of 12 units from one bin when only 10 are available?
Asked once · last asked Oct 11 · Scenario · Mid-level
What should happen if a student's name changes in the database while a caching layer still contains the old name?
Asked once · last asked Oct 11 · Scenario · Mid-level
When multiple clients create items at the same time, how would you prevent duplicate records? For example, two requests creating the same username.
Asked once · last asked Oct 14 · Scenario · Mid-level
An external provider sends a transaction for 50,000 pesos, but a system error causes the same transaction to arrive again. How would you prevent the customer from receiving 100,000 pesos?
Asked once · last asked Oct 15 · Scenario · Senior
A message instructs a banking core to credit 10,000, but the server crashes after updating the account and before acknowledging the message. The message is redelivered after restart. How should the application handle it?
Asked once · last asked Oct 15 · Scenario · Senior
What mechanisms can a test harness use to control and coordinate event ordering, such as scriptable mocks, message-queue test harnesses, or service barriers and hooks, and how can it verify that no duplicate purchase is recorded in the database?
Asked once · last asked Oct 17 · Scenario · Senior
What invariant can prove that a system prevents duplicate purchases, and how can a test framework verify it automatically—for example, with a unique constraint, an idempotency-key row count, or a ledger balance?
Asked once · last asked Oct 17 · Scenario · Senior
How can a Kafka consumer safely apply a database-backed business effect when the same event may be delivered more than once?
Asked once · last asked Oct 18 · Scenario · Senior
When should a Kafka consumer commit its offset relative to completing the database work?
Asked once · last asked Oct 18 · Concept · Senior
Other ways it was asked
- “If the database transaction commits but the Kafka consumer fails before committing the offset, what should happen?”
What failure mode can occur if a Kafka consumer writes an order to the database and records the event as processed in a separate transaction?
Asked once · last asked Oct 18 · Scenario · Senior
When updating critical records, such as vehicle status or wallet balances, when would you choose pessimistic locking over optimistic locking?
Asked once · last asked Oct 19 · Concept · Mid-level
How do you implement optimistic locking in MySQL? Write the syntax.
Asked once · last asked Oct 19 · Write code · Mid-level
An external service sends the same payment notification twice. How would you prevent the payment from being recorded or applied twice, even if both notifications arrive simultaneously?
Asked once · last asked Oct 20 · Scenario · Senior
How would you ensure that a payment is not saved if updating the associated debt fails?
Asked once · last asked Oct 20 · Scenario · Mid-level
A customer makes a 200-sol payment toward a 500-sol debt, and the payment gateway sends two notifications for the same payment simultaneously. How would you prevent duplicate recording and ensure the debt is updated correctly, even if an error occurs?
Asked once · last asked Oct 20 · Scenario · Senior
How do you prevent application delays when a consumer crashes after updating the database but before acknowledging a message?
Asked once · last asked Oct 20 · Scenario · Senior
Write a five- to seven-sentence PR review comment for code that reads from replicas immediately after a write without a consistency guard. Include the risk and a specific fix.
Asked once · last asked Oct 20 · Scenario · Mid-level
If an error occurs in a post-operation plugin, what happens to the database transaction?
Asked once · last asked Oct 20 · Concept · Mid-level
How would you prevent a payment from being recorded twice if a network error occurs or the system sends the amount twice?
Asked once · last asked Oct 21 · Scenario · Mid-level
Design a service that updates its own PostgreSQL database and communicates with two external enterprise systems. One downstream system can occasionally be unavailable. How would you design transaction boundaries, retry and timeout handling, and consistency?
Asked once · last asked Oct 21 · Design · Senior
How would you test that failures midway through a multi-step process leave no partial side effects across related records?
Asked once · last asked Oct 22 · Scenario · Senior
What are transactions and isolation levels? Explain the problems each isolation level solves.
Asked once · last asked Oct 22 · Concept · Senior
What database constraints and state-transition rules would you use to ensure a purchase is finalized exactly once despite duplicate webhooks?
Asked once · last asked Oct 23 · Design · Senior
How do you choose a database transaction isolation level, and what trade-offs influence that choice?
Asked once · last asked Oct 23 · Concept · Mid-level
When two concurrent requests lock the same payment row and one commits a finalized state, what can happen to the other transaction?
Asked once · last asked Oct 23 · Scenario · Senior
How would you make the event handler idempotent across database writes and external API calls so reprocessing after a crash doesn't duplicate side effects?
Asked once · last asked Oct 24 · Scenario · Senior
What are savepoints?
Asked once · last asked Jul 22 · Concept · Junior
Other ways it was asked
- “What is the purpose of a savepoint?”
What problems can concurrency cause in a database?
Asked once · last asked Oct 10 · Concept · Mid-level
What does ACID guarantee in a database, particularly when failures occur?
Asked once · last asked Feb 22 · Concept · Junior
What is a transaction used for in SQL?
Asked once · last asked Apr 10 · Concept · Junior
What is the difference between COMMIT and ROLLBACK in SQL?
Asked once · last asked Apr 10 · Concept · Junior
How would you explain transactions in a relational database?
Asked once · last asked May 19 · Concept · Junior
Can you give an example of a database transaction in a banking system?
Asked once · last asked Jul 16 · Case · Junior
Can you roll back DROP?
Asked once · last asked Jul 20 · Concept · Mid-level
Can you give an example of an atomic operation for updating inventory?
Asked once · last asked Aug 4 · Concept · Mid-level
In DBMS, what is the transaction log?
Asked once · last asked Dec 4 · Concept · Junior
Do you know what a transaction is in a database?
Asked once · last asked Aug 18 · Concept · Junior
What does isolation mean in the context of database transactions?
Asked once · last asked Sep 4 · Concept · Junior
Which failure mode in a database-outbox architecture concerns you most, and why?
Asked once · last asked Sep 16 · Scenario · Senior
How would you manage a transaction that updates three database tables?
Asked once · last asked Sep 30 · Scenario · Mid-level
What transaction propagation levels does Spring support?
Asked once · last asked Oct 9 · Concept · Mid-level
What are atomic transactions?
Asked once · last asked Oct 15 · Concept · Mid-level
More SQL interview questions
- All SQL interview questions
- SQL Basics Interview Questions
- Database Design Interview Questions
- SQL Joins and Aggregation Interview Questions
- Advanced SQL Query Interview Questions
- SQL Views and Stored Procedures Interview Questions
- SQL Query Optimization and Indexing Interview Questions
- Database Integration and Security Interview Questions
- Database Administration and Scaling Interview Questions
How this list is made
Every question here was asked by a real interviewer in a real job interview that a candidate ran MeetAssist in. After the call, the interviewer's questions are pulled from the transcript. Practice sessions, tests, exams and anything that was not a job interview are dropped.
Questions are rewritten so they make sense on their own: names of people, employers and clients are removed, and speech-to-text mistakes are fixed. Small talk, logistics and questions about one candidate's own résumé are left out. Rephrasings of the same question are merged, and the count is the number of different interviews it came up in.
The interviews come from candidates who use MeetAssist, so they lean towards software, data and AI roles: the shares describe these interviews, not every SQL interview. Answers to the most asked questions are written and checked by an editor; a "common mistake" is shown only when reviews of real answers in these interviews show it, with the count.
612 interviews, 357 candidates, Nov 2025 to Oct 2026. Updated every month with new interviews.
Or add the Chrome extension