INTRODUCTION TO TRANSACTION CONCURRENCY:

INTRODUCTION TO TRANSACTION CONCURRENCY

In the previous article we’ve discussed about relational algebra. In this section we’ll learn about INTRODUCTION TO TRANSACTION CONCURRENCY . INTRODUCTION TO TRANSACTION CONCURRENCY is set of operations that are logically related. It contains a group of tasks. A transaction is series of action . These are perform by single user. However, operations are use for accessing the contents of database.

OPERATIONS OF TRANSACTION CONCURRENCY:

Following are the main operations of transaction:

  • Read(X): Read operation is use to read the value of X. From the database and stores in it . These are store in RAM. RAM is main memory . It is store in buffer in main memory.
  • Write(X): It is use to write the value back. Back from buffer to database. But it may be possible that because of hardware failure ,software or power etc. that transaction will fail before finished all the operation in the set. To solve these problems we’ve two important operations:
  • a)Commit: It is use to save the work. Therefore, work will be save permanently.
  • b) Roll back: It is use to undo the work done .

TRANSACTION PROPERTY:

The transaction has four properties. Certainly these are use to maintain consistency in database. Before and After the transaction.

PROPERTIES: Following four properties are known as ACID properties.

  • Atomicity
  • Consistency
  • Isolation
  • Durability

ATOMICITY: It states that all operations take place at once. If not ,the transaction is abort. There is no midway. The transaction cannot occur partially. Each transaction is however consider as one unit. Either run to completion or is not executed at all. It involves following properties.

  • Abort: If a transaction aborts . All changes made are not visible.
  • Commit: If a transaction commits . All changes are visible.

CONSISTENCY: The integrity constraints are maintain. So that the database is consistent. Before and After the transaction. For example the total amount must be maintained. Before or After the transaction as: total before transaction : 600+300=900 and total after transaction: 500+400=900. In this way consistency is maintain.