Professional Documents
Culture Documents
TRANSACTION IN DATABASE
MANAGEMENT SYSTEM
Submitted To:
Professor Dr. Md. Anisur Rahman
Computer Science & Engineering Discipline
Khulna University, Khulna
Submitted By:
Mridha Imran Kabir
Student Id: 180202
3rd year, I term
Computer Science and Engineering Discipline
Khulna University, Khulna
What is Database Transaction?
A transaction is an action or series of actions that are being performed by a single user or
application program, which reads or updates the contents of the database. A transaction can be
defined as a logical unit of work on the database. This may be an entire program, a piece of a
program, or a single command (like the SQL commands such as INSERT or UPDATE), and it may
engage in any number of operations on the database.
ACID properties: A transaction is a single logical unit of work which accesses and possibly
modifies the contents of a database. Transactions access data using read and write operations.
In order to maintain consistency in a database, before and after the transaction, certain
properties are followed. These are called ACID properties.
Atomicity: A transaction is a single unit of operation. You either execute it entirely or do not
execute it at all. There cannot be partial execution.
Consistency: Once the transaction is executed, it should move from one consistent state to
another.
Isolation: Transaction should be executed in isolation from other transactions (no Locks). During
concurrent transaction execution, intermediate transaction results from simultaneously
executed transactions should not be made available to each other. (Level 0,1,2,3)
Durability: After successful completion of a transaction, the changes in the database should
persist. Even in the case of system failures.
• Serial Schedule: When one transaction completely executes before starting another
transaction, the schedule is called serial schedule. A serial schedule is always consistent.
• Concurrent Schedule: When operations of a transaction are interleaved with operations
of other transactions of a schedule, the schedule is called Concurrent schedule.
What is Serializability?
Serializability is the process of search for a concurrent schedule who output is equal to a serial
schedule where transactions are executed one after the other. Depending on the type of
schedules, there are two types of Serializability: