2,666 views
1 votes
1 votes
which of the following must be idempotent.

a)commit                                                                  b)redo

c)write                                                                      d)undo

(please explain )

2 Answers

2 votes
2 votes

Definition: Idempotence is the property of certain operations in mathematics and computer science whereby they can be applied multiple times without changing the result beyond the initial application.

Performing Commit Again and again will not change the initial result.

For example: W(A) → Commit → Commit and repeat…. the result will remain same, there is not even slight possibility that result can change anytime on its own using commit only.

So, Answer is (A)

Now, can Write change the result? Yes there is possibility that the initial result gets changed. 

For example: Initially A=1000 then we write A=500 using W(A) → W(A) → W(A) and repeat…. since there is slight possibility that result is changed by W(A) we will not consider it as answer.

So, C is wrong.

and B and D are obviously wrong since they can change value/result

0 votes
0 votes

Idempotence is the property of certain operations in mathematics and computer science that they can be applied multiple times without changing the result no matter how many times we apply the operation.

we know if once a transaction is committed if we commit again and again no changes will be there.

redo and undo operation changes the value of operation and the more number of times we perform it will be undoing the changes made by the transaction in the database and for write operation it could be possible to change the value with every wite operation performed.

SO CORRECT ANSWER IS A

Related questions

0 votes
0 votes
1 answer
1
Mrityudoot asked Jan 12
143 views
Isn’t F$^{+}$ minimal cover? If C $\rightarrow$ A is already there, then why does augmented CD $\rightarrow$ A needs to be?
0 votes
0 votes
1 answer
2
0 votes
0 votes
1 answer
3