How would a QA engineer test the atomicity of an order operation?

A service adds items to an order and changes its status to paid. The requirements specify that both changes must be committed together. Explain how you would test atomicity: first with a successful operation, then by deliberately causing a failure between SQL statements. What exactly would you check in the database after each scenario?

ExplainTransactions and locksJuniorQABackend