What are the Transaction levels available?

What are the Transaction levels available?

Isolation LevelTransactionsDirty Reads Non-Repeatable Reads Phantom Reads
TRANSACTION_NONE Not supportedNot applicableNot applicableNot applicable
TRANSACTION_READ_COMMITTEDSupportedPreventedAllowedAllowed
TRANSACTION_READ_UNCOMMITTEDSupportedAllowedAllowedAllowed
TRANSACTION_REPEATABLE_READ SupportedPreventedPreventedAllowed
TRANSACTION_SERIALIZABLE SupportedPreventedPreventedPrevented

- A non-repeatable read occurs when transaction A retrieves a row, transaction B subsequently updates the row, and transaction A later retrieves the same row again. Transaction A retrieves the same row twice but sees different data.

- A phantom read occurs when transaction A retrieves a set of rows satisfying a given condition, transaction B subsequently inserts or updates a row such that the row now meets the condition in transaction A, and transaction A later repeats the conditional retrieval. Transaction A now sees an additional row. This row is referred to as a phantom.
What is the purpose of setAutoCommit do?
What is the purpose of setAutoCommit do? - A connection is in auto-commit mode by default which means every SQL statement is treated as a transaction....
What is JDBC driver?
What is JDBC driver? - The JDBC Driver provided by the JDBC API, is a vendor-specific implementations of the abstract classes....
What are the steps required to execute a query in JDBC?
What are the steps required to execute a query in JDBC? - Register the driver with DriverManager class.....
Post your comment