Transaction processing is of growing importance for mobile and web applications. Booking tickets, flight reservation, e-Banking, e-Payment, and booking holiday arrangements are just a few examples. Due to temporarily disconnected situations the synchronization and consistent transaction processing are key issues. To avoid difficulties with blocked transactions or communication loss several authors and technology providers have recommended to use Optimistic Concurrency Control (OCC) to solve the problem. However most vendors of Relational Database Management Systems (DBMS) implemented only locking schemes for concurrency control which prohibit the immediate use of OCC. We propose Row Version Verifying (RVV) discipline to avoid lost updates and achieve a kind of OCC for those DBMS not providing an adequate non-blocking concurrency control. Moreover, the different mechanisms are categorized as access pattern in order to provide programmers with a general guideline for SQL databases. The proposed SQL access patterns are relevant for all transactional applications with unreliable communication and low conflicting situations. We demonstrate the proposed solution using mainstream database systems like Oracle, DB2, and SQLServer.
翻译:事务处理在移动和Web应用中日益重要。票务预订、航班预约、电子银行、电子支付以及度假安排预订等仅是其中少数示例。由于临时断连场景的存在,同步与一致性事务处理成为关键问题。为避免事务阻塞或通信丢失带来的困难,多位学者及技术提供商已推荐采用乐观并发控制(OCC)解决该问题。然而,大多数关系数据库管理系统(DBMS)供应商仅实现了基于锁定的并发控制方案,这阻碍了OCC的直接应用。我们提出行版本验证(RVV)机制,以避免更新丢失,并为那些未提供合适非阻塞并发控制的DBMS实现一种类OCC方案。此外,我们将不同机制归类为访问模式,从而为程序员提供SQL数据库的通用指南。所提出的SQL访问模式适用于所有存在不可靠通信及低冲突场景的事务型应用。我们使用Oracle、DB2及SQLServer等主流数据库系统演示了所提方案。