A4
A4
Lost update - 2 or more transactions seek to update the same thing and one or more
of these updates
are lost/overriden.
Inconsistent retrievals - Occurs when a transaction accesses data prior and after
another
transaction has worked on that same data, leading to two different retrievals.
Uncommited Data - this occurs when one transaction is rolled back after another
transaction has accessed
that uncommited data which has now been erased.
Concurrency control removes these issues by making transactions in isolation,
meaning that
no two transactions can access the same thing at the same time if one of them
seeks to manipulate the data.
Page level lock is preferred because field level lock uses a lot of computer
overhead, as it is referring
to an entire field, whereas a page is only a section of memory that likely does
not encompasse an entire field of a table, therefore making it much smaller.
3. A deadlock is when two transactions are waiting for the other to unlock some
section of data, and
therefore will wait infinitely.
Deadlock prevention seeks to avoid the conditions that would create a deadlock,
such as aborting
transactions that may cause a deadlock by an unlock request.
Deadlock detection seeks to find current deadlocks and abort one of the
transactions to solve the issue.
Deadlock avoidance seeks to force transactions to request locks in succession.
4. the database identifies the last time data was physically saved to the disk via
the transaction log.
For transactions that performed a commitafter that point, the DBMS uses the log
records to redo the transaction. For every other transaction, it takes no action,
as nothing need
be rolled back as it was never put into the data to begin with.