group-icon
Java Developers
Group for Java developers and programmers. Ask questions and get answers related to Java programming
255 Members
Join this group to post and comment.
Gaurav Prasad
Gaurav Prasad
Computer Science
15 Jan 2019

What do you mean by batch processing in JDBC?

details please

Puspanjali Jena
Puspanjali Jena
Computer Science
2mos ago

Batch processing is a facility given by JDBC using which multiple SQL statements are grouped  phusically and submitted at a time to the DBMS for processing as a Batch.

AdhikariHarika Reshma
AdhikariHarika Reshma
Computer Science
2mos ago

Instead of executing a single query  we can execute  batch(group) of queries.By making the performance fast and reducing the amount of  communication overhead.we also have methods like addBatch() ,executeBatch() and many.

Its just the connectivity that we use for entering the data into database using java.The code and the statements which we use is batch processing.The steps are:

1.Load the driver class

2.create statement

3.create connection

4.Add query in the batch

5.Execute Batch

6.Close connection

DHIRAJ LOTLIKAR
DHIRAJ LOTLIKAR
Information Technology
2mos ago

The batch processing consist of the java application at server1 and database at server2 and both are at different location. To connect the java application with the database server than we use sql and implement. We can exexcute as many sql queries as we want. In JDBC batch processing we add all the sql queries which we wish to implement on the database in a single batch. BY this batch we can execute all the sql queries at once. 

The statements are as follows,

void addbatch(String query) : Adds query into batch

int[] executeBatch() : It executes the batch of the queries.