Introduction to Transaction
Processing Concepts and
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
Theory
By,
Dr. P. Gayathri
Associate Professor
SCOPE
VIT University
Transaction Processing system
• System with large DBs and hundreds of users, executing DB
transactions
• Examples:
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Airline reservations
• Banking
• Credit card processing
• Stock market etc…
• These systems require high availability and fast response time
from hundreds of concurrent users.
Introduction to Transaction
Processing
• Single-User System:
• At most one user at a time can use the system.
• Multiuser System:
• Many users can access the system concurrently.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Concurrency
• Multiple users can access DB and use computer system
simultaneously – because of multiprogramming concept
• Multiprogramming – allows the computer to execute multiple
programs or processes at the same time
• Multiprogramming if single CPU exist - Interleaved processing:
• Concurrent execution of processes is interleaved in a single CPU
• Interleaved - Execute some commands from one process then
suspend that process and execute some commands from the next
process and so on.
• A process is resumed at the point where it was suspended whenever
it gets its turn to use the CPU again.
• Multiprogramming if multiple CPU exisit - Parallel processing:
• Processes are concurrently executed in multiple CPUs.
Interleaved processing
• Interleaving keeps the CPU busy
• When the process requires an input or output (I/O) operation
(example- reading a block from a disk), the CPU switches to
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
execute another process rather than remaining idle during I/O
time.
• Interleaving prevents long process from delaying other
processes.
Procesing
Interleaved and Parallel
Dr. P. Gayathri, Associate Professor,
SCOPE, VIT University
Introduction to Transaction Processing
• A Transaction:
• Logical unit of database processing that includes one or more
access operations (read -retrieval, write - insert or update,
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
delete).
• A transaction (set of operations) may be specified in a
high level language like SQL submitted interactively, or
may be embedded within a program.
• Transaction boundaries:
• Begin transaction and End transaction statements in an
application program.
• All DB access operations between begin and end – one single
transaction
• An application program may contain several transactions
separated by the Begin and End transaction boundaries.
Introduction to Transaction Processing
• A database is a collection of named data items
• Granularity of data – Size of data item.
• It can be a field of some record in the DB, or a record , or a whole
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
disk block
Basic operations are read and write
• read_item(X): Reads a database item named X into a
program variable. To simplify our notation, we assume
that the program variable is also named X.
• write_item(X): Writes the value of program variable X
into the database item named X.
Introduction to Transaction Processing
READ AND WRITE OPERATIONS:
• read_item(X) command includes the following steps:
• Find the address of the disk block that contains item X.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Copy that disk block into a buffer in main memory (if that disk
block is not already in some main memory buffer).
• Copy item X from the buffer to the program variable named X.
• write_item(X) command includes the following steps:
• Find the address of the disk block that contains item X.
• Copy that disk block into a buffer in main memory (if that disk
block is not already in some main memory buffer).
• Copy item X from the program variable named X into its
correct location in the buffer.
• Store the updated block from the buffer back to disk (either
immediately or at some later point in time).
Two sample transactions
• FIGURE 17.2 Two sample transactions:
• (a) Transaction T1
• (b) Transaction T2
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
Introduction to Transaction Processing
Why Concurrency Control is needed:
• The Lost Update Problem
• This occurs when two transactions that access the same database
items have their operations interleaved in a way that makes the
value of some database item incorrect.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• The Temporary Update (or Dirty Read) Problem
• This occurs when one transaction updates a database item and then
the transaction fails for some reason
• The updated item is accessed by another transaction before it is
changed back to its original value.
• The Incorrect Summary Problem
• If one transaction is calculating an aggregate summary function on a
number of records while other transactions are updating some of
these records, the aggregate function may calculate some values
before they are updated and others after they are updated.
Concurrent execution is
uncontrolled: (a) The lost
update problem.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
Concurrent execution is
uncontrolled: (b) The
temporary update problem.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
Concurrent execution is
uncontrolled: (c) The incorrect
summary problem.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
Introduction to Transaction
Processing
Why recovery is needed:
• Whenever transaction is submitted to DBMS for
execution, system is responsible for making sure that :
• Either all operations in the transactions are completed
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
successfully and their effect is recorded permanently in the DB
• Successfully executed transactions are in committed state.
• Or transaction does not affect the DB or any other transaction.
Types of failures: (What causes a Transaction to fail)
1. A computer failure (system crash):
A hardware or software error occurs in the computer system
during transaction execution. If the hardware crashes, the contents
of the computer’s internal memory may be lost.
2. A transaction or system error:
Some operation in the transaction may cause it to fail, such as
integer overflow or division by zero. Transaction failure may also
occur because of erroneous parameter values or because of a
logical programming error. In addition, the user may interrupt the
transaction during its execution.
Introduction to Transaction
Processing
3. Local errors or exception conditions detected by the
transaction:
Certain conditions necessitate cancellation of the transaction.
For example, data for the transaction may not be found. A
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
condition, such as insufficient account balance in a
banking database, may cause a transaction, such as a fund
withdrawal from that account, to be canceled.
A programmed abort in the transaction causes it to fail.
4. Concurrency control enforcement:
The concurrency control method may decide to abort the
transaction, to be restarted later, because it violates
serializability or because several transactions are in a state
of deadlock (see later).
Introduction to Transaction
Processing
5. Disk failure:
Some disk blocks may lose their data because of a read or write
malfunction or because of a disk read/write head crash. This may
happen during a read or a write operation of the transaction.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
6. Physical problems and catastrophes:
This refers to an endless list of problems that includes power or air-
conditioning failure, fire, theft, sabotage, overwriting disks or
tapes by mistake, and mounting of a wrong tape by the operator.
Note:
System log contains information about each transaction. It is affect by disk and
catastrophic failures.
Transaction and System Concepts
• A transaction is an atomic unit of work that is either
completed in its entirety or not done at all.
• For recovery purposes, the system needs to
keep track of
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• when the transaction starts
• terminates
• and commits or aborts
Transaction and System Concepts
• Recovery manager keeps track of the following
operations:
• begin_transaction: This marks the beginning of transaction
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
execution.
• read or write: These specify read or write operations on the
database items that are executed as part of a transaction.
• end_transaction: This specifies that read and write transaction
operations have ended and marks the end limit of transaction
execution.
• At this point it may be necessary to check whether the
changes introduced by the transaction can be permanently
applied to the database
• or whether the transaction has to be aborted because it
violates concurrency control or for some other reason.
Transaction and System Concepts
• Recovery manager keeps track of the following operations
(cont):
• commit_transaction: This signals a successful end of the
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
transaction so that any changes (updates) executed by the
transaction can be safely committed to the database and will not
be undone.
• rollback (or abort): This signals that the transaction has ended
unsuccessfully, so that any changes or effects that the transaction
may have applied to the database must be undone.
Transaction and System Concepts
• Transaction moves through the following states.
• Transaction states:
• Active state
• Immediately after it starts execution i.e. it may issue read or
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
write operation
• Partially committed state
• When the transaction ends
• At this point, recovery protocols ensures that system failure
will not result in an inability to record changes of transaction
permanently
• Committed state
• Once above check is successful, the transaction enters into
this state
• Once the transaction is committed, its execution is successful
and its changes must be recorded permanently in the DB
Transaction and System Concepts
• Failed state
• If check in partially committed state fails or transaction is
aborted in active state, transaction moves to failed state
• Transaction then have to be rolled back to undo the effect of
its write operation on the DB
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Terminated State
• Transaction will be in this state when it leaves the system
• During transaction execution, the transaction information that
is maintained in the system tables are removed when it
terminates
Note:
• Failed or aborted transactions may be restarted either
automatically or after being resubmitted by the user as new
transaction
State transition diagram
illustrating the states for
transaction execution
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
Transaction and System Concepts
• The System Log
• Log or Journal: The log keeps track of all transaction operations
that affect the values of database items.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• This information may be needed to permit recovery from transaction
failures.
• The log is kept on disk, so it is not affected by any type of failure
except for disk or catastrophic failure.
• In addition, the log is periodically backed up to archival storage
(tape) to guard against such catastrophic failures.
Transaction and System Concepts
• The System Log (cont):
• T in the following discussion refers to a unique transaction-id
that is generated automatically by the system and is used to
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
identify each transaction:
• Types of log record: (information written to the log)
• [start_transaction,T]: Records that transaction T has started
execution.
• [write_item,T,X,old_value,new_value]: Records that
transaction T has changed the value of database item X from
old_value to new_value.
• [read_item,T,X]: Records that transaction T has read the value
of database item X.
• [commit,T]: Records that transaction T has completed
successfully, and affirms that its effect can be committed
(recorded permanently) to the database.
• [abort,T]: Records that transaction T has been aborted.
Transaction and System Concepts
• The System Log (cont):
• Protocols for recovery that avoid cascading rollbacks do not
require that read operations be written to the system log,
whereas other protocols require these entries for recovery.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Strict protocols require simpler write entries that do not include
new_value (see Section 17.4).
Transaction and System Concepts
• Recovery techniques use the following operators:
• undo: Similar to rollback except that it applies to a single
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
operation rather than to a whole transaction.
• redo: This specifies that certain transaction operations must be
redone to ensure that all the operations of a committed
transaction have been applied successfully to the database.
Transaction and System Concepts
Recovery using log records:
• If the system crashes, we can recover to a consistent
database state by examining the log
1. Because the log contains a record of every write operation
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
that changes the value of some database item, it is possible
to undo the effect of these write operations of a
transaction T by tracing backward through the log and
resetting all items changed by a write operation of T to
their old_values.
2. We can also redo the effect of the write operations of a
transaction T by tracing forward through the log and setting
all items changed by a write operation of T (that did not get
done permanently) to their new_values.
Transaction and System Concepts
Commit Point of a Transaction:
• Definition a Commit Point:
• A transaction T reaches its commit point when all its
operations that access the database have been executed
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
successfully and the effect of all the transaction operations on
the database has been recorded in the log.
• Beyond the commit point, the transaction is said to be
committed, and its effect is assumed to be permanently
recorded in the database.
• The transaction then writes an entry [commit,T] into the log.
• Roll Back of transactions:
• Needed for transactions that have a [start_transaction,T] entry
into the log but no commit entry [commit,T] into the log.
Transaction and System Concepts
Commit Point of a Transaction (cont):
• Redoing transactions:
• Transactions that have written their commit entry in the log must
also have recorded all their write operations in the log; otherwise
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
they would not be committed, so their effect on the database can
be redone from the log entries. (Notice that the log file must be
kept on disk.
• At the time of a system crash, only the log entries that have been
written back to disk are considered in the recovery process
because the contents of main memory may be lost.)
• Force writing a log:
• Before a transaction reaches its commit point, any portion of the
log that has not been written to the disk yet must now be written
to the disk.
• This process is called force-writing the log file before committing
a transaction.
Desirable Properties of Transactions
ACID properties:
• Atomicity: A transaction is an atomic unit of processing; it is either
performed in its entirety or not performed at all.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Consistency preservation: A transaction is consistency preserving if
its complete execution takes the database from one consistent state
to another.
• Isolation: A transaction should not make its updates visible to other
transactions until it is committed; this property, when enforced
strictly, solves the temporary update problem and makes cascading
rollbacks of transactions unnecessary
• Durability or permanency: Once a transaction changes the database
and the changes are committed, these changes must never be lost
because of subsequent failure.
Transaction Schedule
• Transaction schedule or history:
• When transactions are executing concurrently in an
interleaved fashion, the order of execution of operations from
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
the various transactions is known as a transaction schedule (or
history).
• A schedule (or history) S of n transactions T1, T2, …, Tn:
• It is an ordering of the operations of the transactions subject
to the constraint that, for each transaction Ti that participates
in S, the operations of Ti in S must appear in the same order in
which they occur in Ti.
• Note, however, that operations from other transactions Tj can
be interleaved with the operations of Ti in S.
Schedule example
Dr. P. Gayathri, Associate
Professor, SCOPE, VIT
University
based on Recoverability
Characterizing Schedules
Dr. P. Gayathri, Associate
Professor, SCOPE, VIT
University
Cascading Schedule
• If in a schedule, failure of one transaction causes several other
dependent transactions to rollback or abort, then such a
schedule is called as a Cascading Schedule or Cascading
Rollback or Cascading Abort.
• It simply leads to the wastage of CPU time.
University
Professor, SCOPE, VIT
Dr. P. Gayathri, Associate
Cascading Schedule
• Here,
• Transaction T2 depends on transaction T1.
• Transaction T3 depends on transaction T2.
• Transaction T4 depends on transaction T3.
• In this schedule,
University
Professor, SCOPE, VIT
Dr. P. Gayathri, Associate
• The failure of transaction T1 causes the transaction T2 to rollback.
• The rollback of transaction T2 causes the transaction T3 to
rollback.
• The rollback of transaction T3 causes the transaction T4 to
rollback.
Cascadeless Schedule
• If in a schedule, a transaction is not allowed to read a data
item until the last transaction that has written it is committed
or aborted, then such a schedule is called as a Cascadeless
Schedule.
• In other words, Cascadeless schedule allows only committed
read operations.
• Therefore, it avoids cascading roll back and thus saves CPU
University
Professor, SCOPE, VIT
Dr. P. Gayathri, Associate
time.
Cascadeless Schedule
• NOTE-
• Cascadeless schedule allows only committed read operations.
• However, it allows uncommitted write operations.
•
University
Professor, SCOPE, VIT
Dr. P. Gayathri, Associate
• Example-
Strict Schedule
• If in a schedule, a transaction is neither allowed to read nor
write a data item until the last transaction that has written it is
committed or aborted, then such a schedule is called as
a Strict Schedule.
• In other words, Strict schedule allows only committed read
University
Professor, SCOPE, VIT
Dr. P. Gayathri, Associate
and write operations.
Characterizing Schedules
based on Serializability
• Assume that two airline reservation clerks submits
transactions T1 and T2 at approximately same time.
• If no interleaved processing is permitted. Two possibilities are
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
there:
• Execute all operations of T1 in sequence followed by all
operations of T2 in sequence
• Execute all operations of T2 in sequence followed by all
operations of T1in sequence
Characterizing Schedules
based on Serializability
• Two possibilities
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
Characterizing Schedules
based on Serializability
• If interleaved processing is allowed – in many possible orders
the system can execute the individual operations of the
transactions.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
Characterizing Schedules
based on Serializability
• Two possible schedules:
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Serializability of schedules – identifying which schedules are
correct when transactions are executed in interleaved fashion.
Characterizing Schedules
based on Serializability
• Serial schedule and non serial schedule:
• A schedule S is serial if, for every transaction T participating in the
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
schedule, all the operations of T are executed consecutively in the
schedule without interleaved operations.
• Example – schedule A and B
• Otherwise, the schedule is called nonserial schedule
• Transactions in schedule are executed in interleaved fashion.
• Schedule C and D
Serial schedules
• Only one transaction is active at a time
• Commit or abort of active transaction initiates the execution of next
transaction
• No interleaving occurs
• If we consider that the transactions are independent,
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• every serial schedule is considered correct i.e. end result of DB is
correct.
• It does not matter which transaction is execution first.
• But transactions has to be execution from beginning to end without
any interference from operations of other transactions
• Problems with serial schedule:
• Limits concurrent or interleaved operations.
• If transaction waits for I/O operations to complete, we cannot switch
CPU to other another transaction which results in wasting valuable
CPU processing time.
• If some transaction T is quite long, other transactions must wait until
T completes
• Hence serial schedules are unacceptable in practice.
Serial schedules - Example
• Consider schedule A and B
• Assume the initial DB values for X=90, Y=90, N=3, M=2.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• After executing transactions T1 and T2, Expected values of
X=89, Y=93
• Either of A or B can give correct result
• This represents that sequence of execution of transactions
does not matter in serial schedules.
Non Serial schedules - Example
• Consider schedules C and D
• After execution of schedule C, X=92, Y=93. X value is
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
erroneous.
• Schedule C gives wrong result because of lost update problem
• Schedule D gives correct result.
• Non serial schedule may give right result or wrong result.
• We have to determine which non serial schedule always give
right result and which gives wrong result.
• Serializability of schedules – concept used to characterize
schedules as correct or wrong
Serializable schedule
• Types of non serial schedules:
• Serializable – non serial schedule which is equivalent to one or more of
the serial schedules.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Non serializable – non serial schedule which is not equivalent to any of
the serial schedules.
• Serializable schedule: Schedule S is serializable if it is equivalent to
some serial schedule of the same n transactions.
• For n transactions, we have n! possible serial schedules
• Many more non serial schedules.
• Serializable schedules gives correct result as they are equivalent to
serial schedule
When two schedules are
considered equivalent?
• Several ways to define schedule equivalence.
• Simplest method – comparing the effects of schedules on DB
i.e. results obtained from schedule execution
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Result equivalent:
• Two schedules are called result equivalent if they produce the
same final state of the database.
• Two different schedules may accidentally produce same final
state
Result equivalent - example
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
Note: Hence result equivalence alone cannot be used to define schedule
equivalence. Two general definitions used to define schedule equivalence:
1. Conflict equivalence
2. View equivalence
Conflict equivalent
• Conflict operation:
• Two operations in a schedule are said to conflict if they satisfy all
conditions given below:
SCOPE, VIT University
• They belong to different transactions
Dr. P. Gayathri, Associate Professor,
• They access the same data item X
• Atleast one of the operations is write_item(X)
• Conflict equivalent:
• Two schedules are said to be conflict equivalent if the order of
any two conflicting operations is the same in both schedules.
• Conflict serializable:
• A schedule S is said to be conflict serializable if it is conflict
equivalent to some serial schedule S’.
Testing for conflict
serializability
• Looks at only read_Item (X) and write_Item (X) operations
• Constructs a precedence graph (serialization graph) - a graph with
directed edges
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• An edge is created from Ti to Tj if one of the operations in Ti
appears before a conflicting operation in Tj
• The schedule is serializable if and only if the precedence graph
has no cycles.
Algorithm
Dr. P. Gayathri, Associate Professor,
SCOPE, VIT University
Constructing the Precedence
Graphs
• FIGURE 17.7 Constructing the precedence graphs for schedules A and D from Figure 17.5 to
test for conflict serializability.
• (a) Precedence graph for serial schedule A.
• (b) Precedence graph for serial schedule B.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• (c) Precedence graph for schedule C (not serializable).
• (d) Precedence graph for schedule D (serializable, equivalent to schedule A).
Another example of
serializability Testing
Dr. P. Gayathri, Associate Professor,
SCOPE, VIT University
Another Example of
Serializability Testing
Dr. P. Gayathri, Associate Professor,
SCOPE, VIT University
Another Example of
Serializability Testing
Dr. P. Gayathri, Associate Professor,
SCOPE, VIT University
Note:
• Schedule E is not serailizable because precedence graph has
cycles
• Schedule F is serializable.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Serial schedule equivalent to F is T3 -> T1 -> T2
• There may be more than one equivalent serial schedule for a
serializable schedule.
Complete schedule
• A schedule S of n transactions T1, T2, ……, Tn is said to be
complete schedule if the following conditions hold:
• The operations in S are exactly those operations in T1, T2, …, Tn,
including a commit or abort operation as the last operation for
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
each transaction in the schedule
• For any pair of operations from same transaction Ti, their order of
appearance in S is same as their order of appearance in Ti
• For any two conflicting operations, one of the two must occur
before the other in the schedule.
Uses of Serializability
• Being serializable is not the same as being serial
• Being serializable implies that the schedule is a correct
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
schedule.
• It will leave the database in a consistent state.
• The interleaving is appropriate and will result in a state as if the
transactions were serially executed.
• Will achieve efficiency due to concurrent execution.
Uses of Serializability
• Serializability is hard to check.
• Interleaving of operations occurs in an operating system through
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
some scheduler
• Difficult to determine before, how the operations in a schedule
will be interleaved.
View equivalence
• View serializability:
• A schedule is view serializable if it is view equivalent to a serial schedule.
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• View equivalence:
• Two schedules S and S’ are said to be view equivalent if the
following conditions hold:
• The same set of transactions participates in S and S’ and also S and
S’ includes same set of operations of those transactions
• For any operation ri(X) of Ti in S, if the value of X read is written by
operation wj(X) of Tj, the same condition must hold for S’
• If the operation wk(Y) of Tk is the last operation to write item Y in S,
the wk(Y) of Tk must also be the last operation in S’.
Isolation levels support in SQL
• READ UNCOMMITTED
• READ COMMITTED
• REPEATABLE READ
• SERIALIZABLE
University
Professor, SCOPE, VIT
Dr. P. Gayathri, Associate
Potential problem with lower
isolation levels:
• Dirty Read:
• Reading a value that was written by a transaction which failed.
• Nonrepeatable Read:
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
• Allowing another transaction to write a new value between
multiple reads of one transaction.
• A transaction T1 may read a given value from a table. If
another transaction T2 later updates that value and T1 reads
that value again, T1 will see a different value.
• Consider that T1 reads the employee salary for Smith. Next,
T2 updates the salary for Smith. If T1 reads Smith's salary
again, then it will see a different value for Smith's salary.
Potential problem with lower
isolation levels:
• Phantoms:
• New rows being read using the same read with a condition.
• A transaction T1 may read a set of rows from a table, perhaps based on
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
some condition specified in the SQL WHERE clause.
• Now suppose that a transaction T2 inserts a new row that also satisfies
the WHERE clause condition of T1, into the table used by T1.
• If T1 is repeated, then T1 will see a row that previously did not exist, called
a phantom.
Possible violations based on
isolation levels
Type of Violation
Isolation Dirty nonrepeatable
level read read phantom
SCOPE, VIT University
Dr. P. Gayathri, Associate Professor,
_______________________________________________________
READ UNCOMMITTED yes yes yes
READ COMMITTED no yes yes
REPEATABLE READ no no yes
SERIALIZABLE no no no