File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and Relational Databases 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 and Relational Databases
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32026
    
200

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.


[OCA 8 book] [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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between JDBC batch and transaction?