Adbms Imp Answer Chapter 5
Adbms Imp Answer Chapter 5
CHAPTER 5
Active :
This is the initial state.
The Transaction stays in this state while it is
executing.
Various read and write operations are performed on
the database.
Particular Commit :
This is the state after the final statement of the
Transaction is executed.
Failed:
After the discovery that normal execution can no
longer proceed.
Committed:
The state after successful completion of the
Transaction.
It can be ensured that it will never be aborted.
Terminated:
Transaction enters in this state either from
committed or from aborted state.
Information about the Transaction is stored in the
system tables.
Atomicity :-
Atomicity means that a transaction might be either
committed or will not be committed.
If the transaction is not committed then it will restart
from the start.
Consistency :-
Before the transaction starts and after it completes
the starting and the ending production should be
the same.
Isolation :-
Isolation means that multiple transactions are done
parallelly.
Which means that one transaction doesn’t affect
another transaction.
Durability :-
Durability means the guarantee that once a
transaction is successfully committed, the changes
made to the database are permanently stored and
will remain so, even if the system experiences failures
occur.
1) Complete Schedule :
If a schedule contains either COMMIT or ROLLBACK
actions for each Transaction.
It is known as Complete Schedule.
Time-stamp Method for Concurrency Control :
A time-stamp is a unique identifier used to identify
the relative starting time of aTransaction.
This method uses either system time or logical
counter to be used as a time-stamp.
A time-stamp for Transaction T is denoted by TS(T).
To implement this time stamping, following two
time-stamp values are associated with each data
item.
2) Validation Phase
Transaction Ti performs a ``validation test'' to
determine if local variables can be written without
violating serializability.
If the test is positive, then Transaction goes to the
write phase otherwise changes are discarded and
Transaction Ti is restarted.
3) Write Phase
Example:
Transaction-A has obtained lock on X and is waiting
to obtain lock on Y. Transaction-B has obtained lock
on Y and is waiting to obtain lock on X.
Deadlock Detection
This technique allows deadlock to occur but then it
detects it and to solve it.
If a deadlock is detected, one of the Transactions
involved in the deadlock cycle is aborted.
Deadlock Prevention