CONCURRENT TRANSACTIONS
#1

Presented By
Soumya Ranjan Das

[attachment=10332]
Introduction
• A transaction is a unit of program execution that accesses and possibly updates various data items in a database system.
• The transactions are required to have the ACID properties: atomicity, consistency, isolation, and durability.
• Transaction processing system usually allows both single as well as multiple transactions to run.
• Concurrent execution of transactions improves throughput of transactions & system utilization & also reduces the waiting time of transactions.
Transaction Concepts
• A transaction has the following properties:
Atomicity: All operations of the transaction are reflected properly in the database, or none are.
Consistency: Execution of transaction in isolation preserves the consistency of the database.
Isolation: In this each transaction is unaware of other transactions executing concurrently in the system.
Durability: After a transaction completes properly, the changes it has made to the database is retained even if there are system failures.
Transaction State
• A transaction from the beginning to the end, must be in one of the following states:
Active –Transaction stays here while executing.
Partially Committed - After the final statement has been executed.
Failed – If normal execution can no longer proceed.
Aborted – Transaction has been rolled back & database restored to its prior state.
Committed – Transaction is successful.
Concurrent Execution
• Concurrent execution means running side by side or parallely of transactions.
• Advantages of Concurrent execution are:
Improved throughput & Resource utilization – i.e. no. of transactions executed increases in a given amount of time & the processor is utilized properly.
Reduced Waiting time – The unpredictable delays in running transactions as well as the average response time is reduced.
Serializability
• The transaction is a unit that preserves consistency, and serial execution of transaction guarantees that consistency is preserved.
• A schedule in a transaction captures the key action of transaction that affects concurrent execution such as read & write operation.
• So required is that any schedule produced by concurrent processing set of transactions will have an effect equivalent to a schedule produced when these transactions are run serially.
• A system that guarantees this property is said to ensure serializability.
• There are 2 types of serializability:
- Conflict serializability
- View serializability
• Serializability of schedules generated by concurrent transactions can be ensured through concurrency control schemes.
• The schedules should have the following properties:
- they must be recoverable.
- they must be cascadeless.
Transaction Definition in SQL
• It is a data manipulation language which specifies the set of action that constitute a transaction.
• The SQL standard specifies that the transactions begin explicitly.
• The transactions are ended by any one of the following SQL statements:
- Commit work: commits the current transaction & begins a new one.
- Rollback work: It aborts the current transaction.
Concurrency control
• When transactions execute concurrently in the database , the consistency of data may not be preserved . So in order to achieve control , various Concurrency-control schemes are used.
• Concurrency-control schemes are also used to ensure serializability. All these schemes either delay an operation or abort the transaction that issued the operation.
• Most commonly used Concurrency-control schemes are:
-locking protocols
-timestamp based protocols
Lock based protocols
• A locking protocol is a set of rules that state when a transaction may lock and unlock each of the data items in the database.
• Two-phase locking protocol: this protocol allows a transaction to lock a new data item only if that transaction has not yet unlocked any data item. This protocol ensures serializability, but not deadlock freedom.
• Strict two-phase locking protocol: It permits release of exclusive locks only at the end of transactions, in order to ensure recoverability and cascadelessness of the resulting schedules.
• Rigorous two-phase locking protocol: This protocol releases all locks only at the end of the transaction.
Timestamp-based protocols
• A timestamp-based protocol ensures serializability by selecting an ordering in advance between every pair of transactions.
• It works in the following manner:
-first a unique fixed timestamp is associated with each transaction in the system .
-these timestamps of the transactions determine the serializability order.
-if the timestamp of transaction Ti is smaller than the timestamp of transaction Tm , then the scheme ensures that
the produced schedule is equivalent to a serial schedule in which transaction Ti appears before transaction Tm.
• It does so by rolling back a transaction whenever such an order is violated.
Conclusion
• This topic describes about the various concepts of transaction processing. About what it is and how it works. Furthermore it also gives a good layout about the concepts of Concurrent transactions. And also how Concurrent execution of transactions improves throughput of transactions and system utilization reduces waiting time of transactions etc.Also present in the report are the various concurrency-control schemes which ensure a smooth running of the Concurrent transactions as well as the consistency of the database to be preserved
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: concurrent transactions, concurrent transaction ppt, advantage of concurrent transactions, concurrent engg detail seminar report, concurrent programming ppt, concurrent data structure, concurrent programming fundamentals ppt,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: