Tutorial 10 DDD
Tutorial 10 DDD
Answer:
• Atomicity- Either the effects of all or none of its operations remain when a
transaction is completed (committed or aborted respectively). In other words,
to the outside world a committed transaction appears to be indivisible, atomic.
A transaction is an indivisible unit of work that is either performed in its entirety
or not performed at all ("all or nothing" semantics).
• Consistency- Every transaction must leave the database in a consistent state,
i.e., maintain the predetermined integrity rules of the database (constraints
upon and among the database's objects). A transaction must transform a
database from one consistent state to another consistent state.
Answer: When two users are accessing the database simultaneously and at least
one is updating data, there ma be interference that can result in consistencies.
Answer :
The uncommitted dependency: Occurs when one transaction is allowed to see the
intermediate results of another transaction before it has been committed.
5. The lost update problem : Tran T1 and T2 start nearly the same time, both read
the balance as $100. T2 increases balx by $100 to $200 and stored the update in
the database. Meanwhile, Transaction T1 decrements its cop of balx by $10 to $90
and stores this value in the database, overwriting the previous update, thereby
losing the $100 previously added to the balance.