Page 156 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 156

Unit 9: Transaction Management




          Objectives                                                                            Notes

          After studying this unit, you will be able to:
              State the transaction concept

              Explain the idea of serializability and recoverability
              Discuss lock based protocols and deadlock handling
              Define weak level of consistency

          Introduction

          The concept of transaction is the foundation for concurrent execution of transactions in a DBMS
          and recovery from system failure in a DBMS. A user writes data access/updates programs in
          terms of the high level query language supported by the DBMS. To understand how the DBMS
          handles such requests, with respect to concurrency control and recovery, it is convenient  to
          regard an execution of a user program or transaction as a series of read and write of database
          objects.
          To read a database object, it is first brought into main memory (in some frame of the buffer pool)
          from disk, and then its value is copied into a program. This is done by read operation.
          To write a database object, in-memory copy of the object is first modified and then written to
          disk. This all is done by write operation.

          Usually, Database objects are the units in which program reads or writes information. The units
          could be pages, records and so on, but this is dependents on the DBMS. Therefore, we can also
          consider a database to be “a fixed collection of independent objects.”

          A transaction is an execution of a user program and is seen by the DBMS as a series or list of
          actions. The actions that can be executed by a transaction includes the reading and writing of
          database.
          A transaction is a unit of program execution that accesses and possibly updates various data
          items.
          9.1 Concept of a Transaction


          A user writes data access/update programs in terms of the high-level query and update language
          supported by the DBMS. To understand how the DBMS handles such requests, with respect to
          concurrency control and recovery, it is convenient to regard an execution of a user program, or
          transaction, as a series of reads and writes of database objects:
          1.   To read a database object, it is first brought into main memory (specifically, some frame
               in the buffer pool) from disk, and then its value is copied into a program variable.
          2.   To write a database object, an in-memory copy of the object is first modified and then
               written to disk.
          Database ‘objects’ are the units in which programs read or write information. The units could be
          pages, records, and so on, but this is dependent on the DBMS and is not central to the principles
          underlying concurrency control or recovery. In this unit, we will consider a database to be a
          fixed collection of independent objects. When objects are added to or deleted from a database, or
          there are relationships between database objects that we want to exploit for performance, some
          additional issues arise.




                                           LOVELY PROFESSIONAL UNIVERSITY                                   149
   151   152   153   154   155   156   157   158   159   160   161