meta name="google-site-verification" content="5WnqBAqGhoY5qGR6vWeOU46UM0maXZMbAaLr-28Vvhw" /> learning db2: DB2 handling transaction Concept

DB2 handling transaction Concept

Transaction information is kept in a set of files that DB2 maintains called the transaction log. Whenever changes occur in a database, information is recorded in the log files so that DB2 can undo the changes if necessary. The
location of the transaction log is defined in the database configuration file. In this chapter, we will focus on the three main SQL statements that cause logging of data: INSERT, UPDATE, and DELETE.
When you INSERT a row into a table, DB2 must keep a record of the row data in the transaction log. If you have any indexes on that table, additional information related to the index changes must also be logged.
When you UPDATE an existing row in a table, DB2 must keep a record of both the old values and the new values of the row. Of course, if you update only a single column of a row, only the old and new value of the column are logged. Special techniques are used to minimize the number of bytes required to represent changed data. If you have any indexes on the changed column, additional information related to the index must also be logged.
When you DELETE an existing row in a table, DB2 must keep a record of the entire row that was deleted. If you have any indexes on the table, additional information related to the indexes must also be logged.

0 comments:

Post a Comment