arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.09030cs.DB
收藏

面向乐观并发控制的 SQL 访问模式

SQL Access Patterns for Optimistic Concurrency Control

Fritz Laux, Martti Laiho

AI总结:

针对多数关系数据库仅支持锁机制、难以直接使用 OCC 的问题,本文提出 RVV 准则与 SQL 访问模式,以在低冲突、不可靠通信场景下避免丢失更新。

摘要:

事务处理对于移动和 Web 应用正变得日益重要。购票、航班预订、电子银行、电子支付以及度假安排预订只是其中几个例子。由于临时断连的情况,同步和一致的事务处理成为关键问题。为避免事务阻塞或通信丢失带来的困难,多位作者和技术供应商建议使用乐观并发控制(OCC)来解决该问题。然而,大多数关系数据库管理系统(DBMS)供应商只实现了用于并发控制的加锁机制,这使得 OCC 无法直接使用。我们提出行版本验证(RVV)准则,以避免丢失更新,并为那些没有提供适当非阻塞并发控制的 DBMS 实现一种 OCC。此外,本文将不同机制归类为访问模式,以便为程序员提供关于 SQL 数据库的通用指南。所提出的 SQL 访问模式适用于所有通信不可靠且冲突较少的事务型应用。我们使用 Oracle、DB2 和 SQLServer 等主流数据库系统演示了所提出的解决方案。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑