Lab_10_MinchulS.doc - Chapter.10 Transaction Management and...

This preview shows page 1 - 3 out of 6 pages.

Chapter .10 Transaction Management and Concurrency Control Chapter 10 Transaction Management and Concurrency Control Discussion Focus Why does a multi-user database environment give us a special interest in transaction management and concurrency control? Begin by exploring what a transaction is, what its components are, and why it must be managed carefully even in a single-user database environment. A multi-user database environment makes transaction management even more critical. Emphasize the following points: A transaction represents a real-world event such as the sale of a product. A transaction must be a logical unit of work . That is, no portion of a transaction stands by itself. For example, the product sale has an effect on inventory and, if it is a credit sale, it has an effect on customer balances. A transaction must take a database from one consistent state to another . Therefore, all parts of a transaction must be executed or the transaction must be aborted. (A consistent state of the database is one in which all data integrity constraints are satisfied.) All transactions have four properties: A tomicity, C onsistency, I solation, and D urability. (These four properties are also known as the ACID test of transactions.) In addition, multiple transactions must conform to the property of serializability. Table IM10.1 provides a good summary of transaction properties. Table IM10.1 Transaction Properties. Multi-user Databases Single-user Databases atomicity : Unless all parts of the executed, the transaction is aborted consistency . Indicates the permanence of the database’s consistent state. durability : Once a transaction is committed, it cannot be rolled back isolation : Data used by one transaction cannot be used by another transaction until the first transaction is completed. serializability : The result of the concurrent execution of transactions is the same as though the transactions were executed in serial order. 349
Chapter .10 Transaction Management and Concurrency Control Note that SQL provides transaction support through COMMIT (permanently saves changes to disk) and ROLLBACK (restores the previous database state) Each SQL transaction is composed of several database requests , each one of which yields I/O operations. A transaction log keeps track of all transactions that modify the database. The transaction log data may be used for recovery (ROLLBACK) purposes. Next, the concurrency control is the management of concurrent transaction execution. (Therefore, a single-user database does not require concurrency control!) There are concurrency control issues concerning lost updates, uncommitted data, and inconsistent databases. Note that multi-user DBMSs use

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture