This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between JDBC batch and transaction?

 
Carissa Lew
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone explains to me what are the differences between batch and transactions.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A transaction is when the database commits the updates - like a point of no return. A batch is a bunch of statements that gets sent to the database at the same time. A transaction can have multiple batches in it. The batch is just a concept to save database round trips and make the code faster.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic