Prev | Current Page 431 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

The ideas of consistency and isolation are closely related.
Besides the lost update problem, there are several other potential problems. For instance, dirty reads occur
when one transaction reads uncommitted data provided by a second simultaneous transaction, which later rolls
back the changes it made.
Another problem is the nonrepeatable read, which occurs when a transaction has occasion to read the same
data twice while accomplishing its work, only to find the data changed when it reads the data a second time.
This can happen if another transaction makes a change to the data while the first is executing.
A similar issue is the phantom read. If one transaction reads a set of records twice in the course of its work,
it may find new records when it reads the database a second time. That could happen if a second transaction
inserted a new record in the database in the meantime.
The solutions to all these problems involve locking mechanisms to insure consistency and isolation of users
and transactions. In the old days, programmers managed their own locks to provide the necessary protection,
but today one usually relies on the DBMS to manage the locks. To prevent the lost update problem, the DBMS
will manage read and write locks to insure lost updates do not occur.


Pages:
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443
Pozycjonowanie biuro rachunkowe łódź tworzenie stron www wrocław twoje-miasto-poznan.pl giełda samochodowa