Neoview SQL Reference Manual (R2.2)
the isolation level is SERIALIZABLE. If you want to override this automatic choice, the access
mode can be set to READ WRITE using a SET TRANSACTION statement. If AUTOCOMMIT is
OFF, select statements will execute under a READ WRITE transaction by default. If you want to
execute them under a READ ONLY transaction, a SET TRANSACTION must be issued.
READ WRITE
If a transaction is executing with the READ WRITE access mode, statements within the transaction
can read, insert, delete, or update data in tables. Therefore, any DML statement can execute
within that transaction.
If the transaction isolation level is not READ UNCOMMITTED, the default access mode is READ
WRITE. However, you can specify READ ONLY explicitly by using the SET TRANSACTION
statement.
Transaction Isolation Levels
A transaction has an isolation level that is “READ UNCOMMITTED”, “READ COMMITTED”,
or “SERIALIZABLE or REPEATABLE READ ”. The Neoview SQL implementation for
REPEATABLE READ and SERIALIZABLE is equivalent. SERIALIZABLE is used for purposes
of illustration.
You can set the isolation level of a transaction explicitly by using a SET TRANSACTION statement.
See SET TRANSACTION Statement. The default isolation level is READ COMMITTED.
READ UNCOMMITTED
This isolation level allows your transaction to access locked data. You cannot use READ
UNCOMMITTED for transactions that modify the database.
READ UNCOMMITTED provides the lowest level of data consistency. A transaction executing
with this isolation level is allowed to:
• Read data modified by a concurrent transaction (sometimes referred to as dirty reads).
• Read different committed values for the same item at different times or find that the item
no longer exists (sometimes referred to as nonrepeatable reads).
• Read different sets of committed values satisfying the same predicate at different times
(sometimes referred to as phantoms).
READ COMMITTED
This option allows your transaction to access only committed data.
There are no row locks acquired when READ COMMITTED is the specified isolation level.
READ COMMITTED provides the next level of data consistency. A transaction executing with
this isolation level does not allow dirty reads, but both nonrepeatable reads and phantoms are
possible.
READ COMMITTED provides sufficient consistency for any transaction that does not require a
repeatable-read capability.
The default isolation level is READ COMMITTED.
SERIALIZABLE or REPEATABLE READ
This option locks all data accessed through the transaction and holds the locks on data until the
end of the transaction.
SERIALIZABLE provides the highest level of data consistency. A transaction executing with this
isolation level does not allow dirty reads, nonrepeatable reads, or phantoms.
36 Introduction