Database Reference
In-Depth Information
corresponding log record, and redo T. If coordinator responds with an abort message,
write corresponding log record, and undo T. Then write end log record for T.
Case 3. No prepare , commit , or abort record in the log file.
Abort and undo T. Write end log record for T. In this case, we safely assume the
site could not have voted to commit T before the crash.
Three-Phase Commit Protocol (3PC) Think of the effect of a crash on the par-
ticipants if the coordinator fails. In the above discussion of transaction T, partici-
pants that have voted to commit cannot decide on the course of action—whether
to commit or abort—until the coordinating site recovers. That means T is blocked.
However, the active participants can talk to one another and check whether at least
one of them has an abort or commit log record.
The three-phase commit protocol is intended to avoid blocking even if the
coordinator site fails during recovery. This protocol postpones the decision to
commit until it is ensured that a sufficient number of sites know about the decision
to commit. The idea is that these participant sites could communicate among them-
selves and find out about the decision to commit or abort, even if the coordinator
site fails. Here, briefly, is how the protocol works:
Coordinator sends prepare message to each participant.
When coordinator receives ready-commit messages back from all participants,
it sends out precommit messages instead of commit messages.
When coordinator receives back sufficient number of acknowledgements back
from the participants, it writes a commit record in its log file and sends out
commit messages.
CHAPTER SUMMARY
Distributed database systems are emerging as a result of the merger of two
major technologies: database and network.
A distributed database features geographic separation of data but preserves
logical unity and integrity. Each data fragment is stored at the site where it is
most frequently used.
A distributed database management system (DDBMS) is a software system
that manages the distributed database and makes the distribution transparent
to the user.
Motivation and goals of a distributed system: efficient access of local data,
improved customer service, enhanced reliability, availability of global data. A
distributed system offers several advantages but also has a few shortcomings.
Two broad types of distributed database systems: homogeneous, in which all
sites run under the same DBMS; heterogeneous, in which a different DBMS
may manage the data at each site.
For a distributed database, DDBMS supports several schema levels: global
external, global conceptual, data fragmentation, data allocation, local external,
local conceptual, and local internal.
Search WWH ::




Custom Search