Ch 10 Flashcards
Transaction
A transaction is a logical unit of work that must be entirely completed or entirely aborted; no intermediate states are acceptable.
Consistent database state
A consistent database state is one in which all data integrity constraints are satisfied.
Database request
A database request is the equivalent of a single SQL statement in an application program or transaction. E.g. if a transaction is composed of two UPDATE and one INSERT statement, the transaction uses three database requests.
Atomicity
Atomicity requires that all operations (SQL requests) of a transaction be completed; if not, the transaction is aborted.
Consistency
Consistency indicates the permeance of the database’s consistent state. A transaction takes a database from one consistent state to another. When a transaction is completed, the database must be in a consistent state; if any of the transaction parts violates an integrity constraint, the entire transaction is aborted.
Isolation
Isolation means that the data used during the execution of a transaction cannot be used by a second transaction until the first one is completed.
Durability
Durability ensures that once transaction changes are done and committed, they cannot be undone or lost, even in the event of a system failure.
Serializability
Serializability ensures that the schedule for the concurrent execution of the transactions yields consistent results. This property is important in multiuser and distributed databases in which multiple transactions are likely to be executed concurrently. Naturally, if only a single transaction is executed, serializability is not an issue.
Transaction log
A DBMS uses a transaction log to keep track of all transactions that update the database.
Concurrency control
Coordinating the simultaneous execution of transactions in a multiuser database system is known as concurrency control. The objective of concurrency control is to ensure the serializability of transactions in a multiuser database environment.
Lost update
The lost update problem occurs when two concurrent transactions are updating the same data element and one of the updates is lost (overwritten by the other transaction).
Uncommitted data
The phenomenon of uncommitted data occurs when two transactions are executed concurrently and the first transaction is rolled back after the second transaction has already accessed the uncommitted data - thus violating the isolation property of transactions.
Inconsistent retrievals
Inconsistent retrievals occur when a transaction accesses data before and after one or more other transactions finish working with such data. E.g. an inconsistent retrieval would occur if transaction T1 calculated some summary (aggregate) function over a set of data while another transaction (T2) was updating the same data. The problem is that the transaction might read some data before they are changed and other data after they are changed, thereby yielding inconsistent results.
Scheduler
The scheduler is a special DBMS process that establishes the order in which the operations are executed within concurrent transactions. The scheduler interleaves the execution of database operations to ensure serializability and isolation of transactions.
Serializable schedule
The scheduler’s main job is to create a serializable schedule of a transaction’s operations, in which the interleaved execution of the transactions yields the same results as if the transactions were executed in serial order one after another.
Lock
A lock guarantees exclusive use of a data item to a current transaction.
Pessimistic locking
The use of locks based on the assumption that conflict between transactions is likely is often referred to as pessimistic locking.
Lock manager
All lock information is handled by a lock manager, which is responsible for assigning and policing the locks used by the transactions.
Lock granularity
Lock granularity indicates the level of lock use. Locking can take place at the following levels: database, table, page, row, or even field (attribute).