Multiple choice technology architecture

Which of the following is false wrt Transactions ?

  1. A transaction is a set of sql statements

  2. Auto commit to be set off before Transaction

  3. Auto commit to be set off after transaction

  4. Commit permanently records to database all changes waiting with current Connection

  5. Rollback is used in case of any error to undo transaction

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In JDBC transactions, auto-commit must be disabled BEFORE beginning transactional operations, not after. Setting setAutoCommit(false) before the transaction ensures statements are grouped. Setting it after would be meaningless as the transaction would have already executed in auto-commit mode. Options A, B, D, and E describe true transaction characteristics.