809 views
0 votes
0 votes

To undo the effects of a committed transaction the only way is 

a) rollback transaction   b) abort transaction

c) execute a compensating transaction   d)None of these

 

2 Answers

Best answer
1 votes
1 votes

Answer is compensating transaction.

There are two groups of systems where compensating transaction may be applied:

1. In the context of a database this is often easily achieved using transaction and the commit/rollback mechanism.Compensating transaction logic could be implemented as additional on top of database supporting commit/rollback. In that case we can decrease business transaction granularity.

2. For systems without a commit/rollback mechanism available, one can undo a failed transaction with a compensating transaction, which will bring the system back to its initial state. Typically, this is only a workaround which has to be implemented manually and cannot guarantee that the system always ends in a consistent state. The system designer may need to consider what happens if the compensating transaction also fails.

selected by
0 votes
0 votes
(C) Execute a compensating transaction. Suppose in a transaction if you have deducted some value from Variable A and then you realize that you don’t have deduct  value of A in transaction and if transaction committed then you cannot do rollback as values are stored from temporary buffer to permanent database. But  we can  do one thing start new transaction which increments value of A by  doing so it will nullify effect of previous transaction so yes this new transaction is known compensating transaction which compensates loses and undo effects of previous transaction which we do not want to perform but my mistake it happened or some other reason.

Related questions

1 votes
1 votes
0 answers
1
2 votes
2 votes
3 answers
2
Sunnidhya Roy asked Dec 13, 2022
1,961 views
A Relation R is in 3NF and have only 1 Candidate Key(may or may not be composite), then R is in BCNF. True or False??
0 votes
0 votes
1 answer
3
samarpita asked Nov 14, 2021
257 views
Hash indexing and Hash file organization are there in gate syllabus???I also wanted to know what are the topics are there in file organization and indexes….as I don’t...
0 votes
0 votes
1 answer
4
debasree88 asked Apr 23, 2019
263 views
Can attributes of alternate keys be prime attributes? since alternate keys can qualify for candidate key hence attributes of alternate keys can become prime attribute??