CH6 Flashcards
Database Administration Functions
– Concurrency control
– Security
– Backup
– Recovery
Concurrency Control
ensures that one user’s actions do not impact another user’s actions
Concurrent Transaction
When two transactions are being processed against a database at the same time
Interdependency
Changes required by one user may impact others
Atomic Transactions
database operation typically involves several transactions.
transactions are atomic and are sometimes called logical units of work (LUW).
Lost Update Problem
• If two or more users are attempting to update the same piece of data at the same time, it is possible that one update may overwrite the other update
Concurrency Issues
- Dirty reads
* Phantom reads
Dirty reads
The transaction reads a changed record that has not been committed to the database
Phantom reads
The transaction re-reads a data set and finds that a new record has been added
Implicit locks
issued automatically by the DBMS based on an activity.
Explicit locks
issued by users requesting exclusive rights to the data.
Serializable Transactions
When two or more transactions are processed concurrently, the results in the database should be logically consistent with the results that would have been achieved had the transactions been processed in an arbitrary serial fashion
Two-Phased Locking
- One way to achieve serializable transactions is by using two-phased locking.
- Two-phased locking lets locks be obtained and released as they are needed
Growing phase
when the transaction continues to request additional locks
Shrinking phase
when the transaction begins to release the locks