You are designing a banking application where multiple users can transfer money between accounts concurrently. How would you ensure data consistency and avoid concurrency issues?
- Caching without Locking
- Optimistic Concurrency Control
- Pessimistic Concurrency Control
- Using Database Transactions
In a banking application, ensuring data consistency during concurrent transactions is critical. Using database transactions provides a reliable method to maintain atomicity, consistency, isolation, and durability (ACID properties). This approach helps prevent issues such as lost updates or inconsistent states.
Loading...
Related Quiz
- In which scenario would you typically use the "git rebase" command over "git merge"?
- In database systems, a _______ is a mechanism to control access to data items by multiple transactions.
- In _______ caching, data is stored closer to the end-user to reduce latency.
- Your organization has experienced a data breach. Outline the steps you would take to respond and recover from the incident.
- _______ is a technique used to optimize database performance by storing frequently accessed data in memory.