1. Deferred Update :
It is a technique for the maintenance of the transaction log files of the DBMS. It is also called NO-REDO/UNDO technique. It is used for the recovery of the transaction failures which occur due to power, memory or OS failures. Whenever any transaction is executed, the updates are not made immediately to the database. They are first recorded on the log file and then those changes are applied once commit is done. This is called “Re-doing” process. Once the rollback is done none of the changes are applied to the database and the changes in the log file are also discarded. If commit is done before crashing of the system, then after restarting of the system the changes that have been recorded in the log file are thus applied to the database.
2. Immediate Update :
It is a technique for the maintenance of the transaction log files of the DBMS.It is also called UNDO/REDO technique. It is used for the recovery of the transaction failures which occur due to power, memory or OS failures. Whenever any transaction is executed, the updates are made directly to the database and the log file is also maintained which contains both old and new values. Once commit is done, all the changes get stored permanently into the database and records in log file are thus discarded.Once rollback is done the old values get restored in the database and all the changes made to the database are also discarded. This is called “Un-doing” process. If commit is done before crashing of the system, then after restarting of the system the changes are stored permanently in the database.
Difference between Deferred update and Immediate update:
|S.NO.||Deferred Update||Immediate Update|
|1.||In deferred update, the changes are not applied immediately to the database.||In immediate update, the changes are applied directly to the database.|
|2.||The log file contains all the changes that are to be applied to the database.||The log file contains both old as well as new values.|
|3.||In this method once rollback is done all the records of log file are discarded and no changes are applied to the database.||In this method once rollback is done the old values are restored into the database using the records of the log file.|
|4.||Concepts of buffering and caching are used in deferred update method.||Concept of shadow paging is used in immediate update method.|
|5.||The major disadvantage of this method is that it requires a lot of time for recovery in case of system failure.||The major disadvantage of this method is that there are frequent I/O operations while the transaction is active.|
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Difference between ALTER and UPDATE Command in SQL
- SQL | UPDATE Statement
- Update clause in Cassandra
- Difference between DVD-R and DVD-RW
- Difference Between DAS and SAN
- Difference between ZIP and RAR
- Difference between T-SQL and PL-SQL
- Difference between GCC and G++
- Difference between SDN and NFV
- Difference between H.323 and SIP
- Difference between MP4 and MP3
- Difference between MAN and WAN
- Difference between C++ and Go
- Difference between GSM and LTE
- Difference between CLI and GUI
- Difference between OOP and POP
- Difference between CRT and LCD
- Difference between PCA VS t-SNE
- Difference between URL and URI
- Difference between WCF and Web API
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.