

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Explain about concurrent transactions in DBMS
A transaction is a unit of database processing which contains a set of operations. For example, deposit of money, balance enquiry, reservation of tickets etc.
Every transaction starts with delimiters begin transaction and terminates with end transaction delimiters. The set of operations within these two delimiters constitute one transaction.
main() { begin transaction } end transaction
There are three possible ways in which a transaction can be executed. These are as follows −
- Serial execution.
- Parallel execution.
- Concurrent execution.
Concurrent transaction or execution includes multiple transactions which are executed concurrently or simultaneously in the system.
Advantages
The advantages of the concurrent transactions are as follows −
Increases throughput which is nothing but number of transactions completed per unit time.
It reduces the waiting time.
Example
T1= 90sec T2= 500sec T3= 5sec.
If we execute serially by T1->T2->T3 then transaction T3 waits for 590 sec, so we go for non-serial or concurrent transactions to reduce waiting time.
i.e. T3 -> T1 -> T2.
Disadvantage
The disadvantage is that the execution of concurrent transactions may result in inconsistency.
Example 1
The concurrent execution given below is in a consistent state.
Example 2
The transaction given below is not consistent.
Concurrent schedules do not keep the database in the consistent state. The concurrent execution of the transactions has to be carried out in a controlled environment.
If a system consists of ‘n’ number of transactions, we will have more than ‘n!’ number of concurrent schedules, out of which only a few of them are keeping the database in consistent state.
- Related Questions & Answers
- Explain about nested queries in DBMS
- Explain about conflict serializability in DBMS
- Explain about 2NF with an example in DBMS
- Explain about triggers and active databases in DBMS
- Explain about two phase locking (2PL) protocol(DBMS)
- Explain about the Time stamp ordering protocol in DBMS
- Explain about insert command in Structured query language in DBMS
- Explain about Create, Insert, Select command in structure query language (DBMS)?
- Explain about financial strategy.
- Explain about Transfer pricing
- Explain about Varargs in java?
- Explain about StringJoiner in java8?
- Explain about derivatives in finance.
- Explain Select command in DBMS
- Explain set operators in DBMS