Compare the Difference Between Similar Terms

Difference Between

Home / Technology / IT / Database /区别延迟更新和直接pdate

区别延迟更新和直接pdate

May 14, 2011Posted byIndika

Deferred Update vs Immediate Update

Deferred Update and Immediate Update are two techniques used to maintain transaction log files of Database Management Systems (DBMS). Transaction log (also referred to as the journal log or the redo log) is a physical file that stores the Transaction ID, the time stamp of the transaction, the old value and the new values of the data. This allows the DBMS to keep track of the data before and after each transaction. When the transactions are committed and the database is returned to a consistent state, the log might be truncated to remove the committed transactions.

Deferred Update

Deferred update also called NO-UNDO/REDO is a technique used to recover/support transaction failures that occur due to operating system, power, memory or machine failures. When a transaction runs, any updates or alterations made to the database by the transaction are not done immediately. They are recorded in the log file. Data changes recorded in the log file are applied to the database on commit. This process is called “Re-doing”. On rollback, any changes to data recorded in the log file are discarded; hence no changes will be applied to the database. If a transaction fails and it is not committed due to any of the reasons mentioned above, the records in the log file are discarded and the transaction is restarted. If the changes in a transaction are committed before crashing, then after the system restarts, changes recorded in the log file are applied to the database.

Immediate Update

Immediate update also called UNDO/REDO, is also another technique used to recover/support transaction failures that occur due to operating system, power, memory or machine failures. When a transaction runs, any of the updates or alterations made by the transaction are written directly in to the database. Both the original values and the new values are also recorded in the log file before changes are made to the database. On commit all changes made to the database are made permanent and the records in the log file are discarded. On rollback old values are restored in to the database using the old values stored in the log file. All the changes made by transactions to the database are discarded and this process is called “Un-doing”. When the system restarts after a crash, all the database changes are made permanent for committed transactions. For uncommitted transactions, original values are restored using the values in the log file.

What is the difference between Deferred Update and Immediate Update

即使延迟更新和即时更新re two methods for recovering after a system failure, the process that each method uses is different. In differed update method, any changes made to the data by a transaction are first recorded in a log file and applied to the database on commit. In immediate update method, changes made by a transaction are directly applied to the database and old values and new values are recorded in the log file. These records are used to restore old values on rollback. In differed update method, records in the log file are discarded on roll back and are never applied to the database. One disadvantage of deferred update method is the increased time taken to recover in case of a system failure. On the other hand, frequent I/O operations while the transaction is active, is a disadvantage in immediate update method.

Related posts:

Difference Between MySQL and PostgreSQL Difference Between SQL Server 2008 and Express Difference Between RDBMS and ORDBMS Difference Between DBMS and Data Warehouse Difference Between Explicit Cursor and Implicit Cursor

Filed Under:DatabaseTagged With:committed transactions,Deferred Update,Immediate Update,journal log,log file,NO-UNDO/REDO,Re-doing,recover transaction failures,redo log,transaction log,transaction log files,uncommitted transactions,UNDO/REDO

About the Author:Indika

Indika, BSc.Eng, MSECE Computer Engineering, PhD. Computer Science, is an Assistant Professor and has research interests in the areas of Bioinformatics, Computational Biology, and Biomedical Natural Language Processing.

Comments

  1. Jeleigh15says

    August 22, 2011 at 9:30 am

    very informative article :))

    Reply
  2. Sahil Sharmasays

    April 28, 2015 at 4:43 pm

    Concise and GREAT

    Reply
    • Jessicasays

      January 9, 2018 at 5:00 pm

      Please what is the Disadvantage and advantage of deferred update

      Reply

Leave a ReplyCancel reply

Your email address will not be published.Required fields are marked*

Request Article

Featured Posts

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and SARS

Difference Between Coronavirus and SARS

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Covid 19

Difference Between Coronavirus and Covid 19

You May Like

What is the Difference Between Ferro Manganese and Silico Manganese

What is the Difference Between Ferro Manganese and Silico Manganese

Difference Between Bandwidth and Frequency

Difference Between Bandwidth and Frequency

Difference Between Male and Female Elephants

Difference Between Variance and Standard Deviation

Difference Between Active Filter and Passive Filter

Latest Posts

  • What is the Difference Between Graphite and Lead
  • What is the Difference Between Symptom and Syndrome
  • What is the Difference Between Platelet Plug and Blood Clot
  • What is the Difference Between Agglutination and Hemagglutination
  • What is the Difference Between Fullerene and Carbon Nanotubes
  • What is the Difference Between Dialysis and Kidney Transplant
  • Home
  • Vacancies
  • About
  • Request Article
  • Contact Us

Copyright © 2010-2018Difference Between. All rights reserved.Terms of Useand Privacy Policy:Legal.