A transaction is a unit of work that includes one or many operations that change data. If successful, all the data changes are committed (applied to the database). If one of the operations errors out or the transaction is rolled back, then none of the changes included in the transaction will be applied to the database.
Transaction properties are set up on the Connection object. They can be changed without closing the connection, so different transactions can reuse the same Connection object.
JDBC allows transaction control only for CRUD operations. Table modification (CREATE TABLE, ALTER TABLE, and so on) is committed automatically and cannot be controlled from the Java code.
By default, a CRUD operation transaction is set to ...