jQuery in Action, 2nd edition*
The moose likes JDBC and the fly likes Difference between JDBC batch and transaction? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Difference between JDBC batch and transaction?" Watch "Difference between JDBC batch and transaction?" New topic
Author

Difference between JDBC batch and transaction?

Eva Chow
Greenhorn

Joined: Oct 08, 2012
Posts: 5
Can someone explains to me what are the differences between batch and transactions.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30123
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
Consider Paul's rocket mass heater.
 
subject: Difference between JDBC batch and transaction?
 
Similar Threads
diff between
Checking for Date Time
diff between callable statement and batch updates
difference between exe file and batch file
5 letter scrabble