Database Reference
In-Depth Information
LOGGIN G
Daily
full
backup
Archived
log file
Disk
log file
CRASH
1
2
TIMELINE
3
4
Checkpoint-1
Checkpoint-2 Checkpoint-3
Checkpoint-4
RECOVER Y
Daily
full
backup
Database
restored up to
Database
restored up to
3
Disk
log file
1
Committed and
in-flight
transactions
resolved up to
Database
restored up to
2
Archived
log file
Disk
log file
4
Figure 15-31
A database recovery example.
A proper transaction must have the properties of atomicity, consistency,
isolation, and durability(ACID).
Operations or actions performed by a transaction: BEGIN, READ, WRITE,
END, COMMIT, ABORT, ROLLBACK.
Major benefits of transaction concurrency: increased system throughput,
reduced response times, simultaneous sharing.
Three primary types of concurrency problems: lost update, dependency on
uncommitted update, inconsistent summary.
A schedule is a set of interleaved database operations of concurrent transac-
tions. A serializable schedule leaves the database in a consistent state.
Lock-based techniques resolve concurrency problems. A transaction may hold
a shared or exclusive lock on a data item.
The two-phase locking protocol guarantees serializability. However,
two-phased locking or any other lock-based scheme cannot avoid deadlock
situations.
Deadlock prevention and deadlock detection are two methods for deadlock
resolution.
The timestamp-ordering protocol also resolves transaction concurrency
problems. This scheme does not depend on locks.
Common types of database failures: system error, system failure, disk failure,
physical failure, human error.
Search WWH ::




Custom Search