tailieunhanh - SQL Anywhere Studio 9- P7
Tham khảo tài liệu 'sql anywhere studio 9- p7', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 336 Chapter 9 Protecting flexible facility that was described in Section Savepoints and Subtransactions. Locks In order to improve overall productivity different transactions are allowed to overlap one another in a multi-user environment. For example if SQL Anywhere has processed an UPDATE and is waiting to receive the next SQL command that is part of the same transaction and a SELECT that is part of a different transaction arrives in the meantime it will try to process the SELECT immediately. If SQL Anywhere only worked on one transaction at a time no one would get any work done in reality the database engine can switch back and forth among hundreds of overlapping transactions in a busy environment. The ability of SQL Anywhere to process overlapping transactions is called concurrency and it may conflict with two of the basic requirements of a transaction consistency and isolation. For example if two overlapping transactions were allowed to update the same row the requirement that changes made by different transactions must be isolated from one another would be violated. Another example is a transaction design that requires data to remain unchanged between retrieval and update in order for the final result to be consistent that requirement would be violated by an overlapping transaction that changed the data after the first transaction retrieved it even if the second transaction committed its change before the first transaction performed its update. SQL Anywhere uses locks to preserve isolation and consistency while allowing concurrency. A lock is a piece of data stored in an internal table maintained by SQL Anywhere. Each lock represents a requirement that must be met before a particular connection can proceed with its work and logically it is implemented as a temporary relationship between that connection and a single row or table. While it exists a lock serves to prevent any other connection from performing certain operations on that table or row. When a
đang nạp các trang xem trước