How would you handle two managers editing the same customer record?
Two managers open the same customer record in a web interface. The first changes the phone number and saves it. Twenty minutes later, the second changes the address and clicks “Save” without refreshing the page. The second manager's form still contains the old data, including the previous phone number. How would you design the HTTP API and database update to prevent the second save from restoring the old phone number? Explain how the server would detect the conflict, what response it would return, and how the interface would help the user save their changes.
ExplainTransactions and locksMiddleBackendData Engineer