What do you mean by batch processing in JDBC?
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.
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
4.Add query in the batch
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.