Lecture 16 - JDBC Part 2 Flashcards

1
Q

What are JDBC transactions?

A
  • Transaction = more than one statement which must all succeed (or all fail) together
  • If one fails, the system must reverse all previous actions
  • Also can’t leave DB in inconsistent state halfway through a transaction
  • COMMIT = complete transaction
  • ROLLBACK = abort
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is transaction management?

A
  • Transactions are not explicitly opened and closed
  • The connection has a state called AutoCommit mode
  • if AutoCommit is true, then every statement is automatically committed
  • if AutoCommit is false, then every statement is added to an ongoing transaction
  • Default: true
How well did you know this?
1
Not at all
2
3
4
5
Perfectly