Skip to content
Sharp

SQL for Java Devs · interview question

Who should usually own the transaction for a checkout that saves the order, inserts items, and updates stock?

Multiple choiceMediumchapter-8-curatedpremiumsql-for-java-devstransactions
Choose one answer
Answer and explanation

Correct answer

A. The service or use-case layer coordinating the whole workflow

Why

A checkout transaction often spans multiple repository calls. The coordinating service can see the full workflow and is the right place to decide whether all related writes succeed or fail together.

Test yourself on SQL for Java Devs

A free test with instant, explained results. No account needed.

Start free test
All SQL for Java Devs questions →