Page 93 - CITS - Computer Software Application -TT
P. 93

COMPUTER SOFTWARE APPLICATION - CITS




















           Consistency
           This means that integrity constraints must be maintained so that the database is consistent before and after the
           transaction. It refers to the correctness of a database. Referring to the example above,

           The total amount before and after the transaction must be maintained.
           Total before T occurs = 500 + 200 = 700.
           Total after T occurs = 400 + 300 = 700.
           Therefore, the database is consistent. Inconsistency occurs in case T1 completes but T2 fails. As a result, T is
           incomplete.
           Isolation
           This property ensures that multiple transactions can occur concurrently without leading to the inconsistency of
           the database state. Transactions occur independently without interference. Changes occurring in a particular
           transaction will not be visible to any other transaction until that particular change in that transaction is written to
           memory or has been committed. This property ensures that the execution of transactions concurrently will result
           in a state that is equivalent to a state achieved these were executed serially in some order.
           Let X= 500, Y = 500.
           Consider two transactions T and T”.


















           Suppose T has been executed till Read (Y) and then T’’ starts. As a result, interleaving of operations takes place
           due to which T’’ reads the correct value of X but the incorrect value of Y and sum computed by

           T’’: (X+Y = 50, 000+500=50, 500)
           is thus not consistent with the sum at end of the transaction:
           T: (X+Y = 50, 000 + 450 = 50, 450).
           This results in database inconsistency, due to a loss of 50 units. Hence, transactions must take place in isolation
           and changes should be visible only after they have been made to the main memory.
           Durability
           This property ensures that once the transaction has completed execution, the updates and modifications to the
           database are stored in and written to disk and they persist even if a system failure occurs. These updates now
           become permanent and are stored in non-volatile memory. The effects of the transaction, thus, are never lost.




                                                           80

                              CITS : IT&ITES - Computer software application - Lesson 18 - 36
   88   89   90   91   92   93   94   95   96   97   98