Prev | Current Page 429 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

Every
change to the database that occurs within the transaction boundaries must be successful, or the transaction will
be rolled back. When a transaction is rolled back, the values of all columns in all rows will be restored to the
values they had when the transaction began.
Transactions are implemented using write-ahead logging. Changes to the database, along with the previous
values, are written to the log, not to the database, as the transaction proceeds. When the transaction is completely
successful, it is committed. At that point the changes previously written to the log are actually written to the database,
and the changes become visible to other users. On the other hand, if any part of the transaction fails, for any
reason, the changes are rolled back, i.e., none of the changes written to the log are actually made to the database.
Write-ahead logging is also useful in recovering a database from a system failure. The log contains all the
changes to the database, including information about whether each transaction was committed or rolled back.
To recover a database, the administrator can restore a previous backup of the database, and then process the
transaction log, ???redoing??? committed transactions.


Pages:
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441
rolety rzymskie mieszkanie sosnowiec ABC parasole reklamowe podłogi drewniane