1.

What are the isolation levels of connections in JDBC?

Answer»
  • The transaction isolation level is a value that decides the level at which inconsistent data is permitted in a transaction, which means it represents the degree of isolation of one transaction from another. A higher level of isolation will result in improvement of data accuracy, but it might decrease the number of concurrent transactions. Similarly, a lower level of isolation PERMITS for more concurrent transactions, but it reduces the data accuracy.
  • To ensure data integrity during transactions in JDBC, the DBMS make USE of locks to prevent access to other accesses to the data which is INVOLVED in the transaction. Such locks are necessary for preventing Dirty Read, Non-Repeatable Read, and Phantom-Read in the database.
  • It is used for the locking mechanism by DBMS and can be SET using setTransactionIsolation() method. You can obtain details about the level of isolation used by the connection using getTransactionIsolation() method.


Discussion

No Comment Found