What are the standard isolation levels defined by JDBC? The values are defined in the class java.sql.Connection and are:
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.