What are the standard isolation levels defined by JDBC?

What are the standard isolation levels defined by JDBC?

The values are defined in the class java.sql.Connection and are:

TRANSACTION_NONE
TRANSACTION_READ_COMMITTED
TRANSACTION_READ_UNCOMMITTED
TRANSACTION_REPEATABLE_READ
TRANSACTION_SERIALIZABLE

Any given database may not support all of these levels.

Explain the standard isolation levels defined by JDBC.

The following are isolation levels of JDBC:

1. TRANSACTION_NONE: The execution of transaction is done as per the default isolation level of the JDBC driver.
2. TRANSACTION_READ_UNCOMMITTED: It is a transaction for reading the uncommitted data of a database source. No shared locks are issued and no exclusive locks are honoured.
3. TRANSACTION_READ_COMMITTED: It is a transaction for reading the committed data of a database source. Shared locks are held while avoiding dirty reads.
4. TRANSACTION_REPEATABLE_READ: The data used for query is prevented from other user’s updations on data, by using locks.
5. TRANSACTION_SERIALIZABLE: A lock by name range lock is placed on the database data set until the transaction is completed. It prevents other users from updating or inserting rows.
How do we call stored procedure using JDBC
A stored procedure is invoked by using CallableStatement object. It also requires an open Connection object...
What is a thread? What are the advantages we derived by programming with thread?
What is a thread? - Threads allow programs to execute simultaneously. A thread is an independent path of execution in a program...
How to create a thread and start it running?
How to create a thread and start it running? - There are 2 ways in which a thread can be created...
Post your comment