what is the best way, in terms of performance, to do
multiple insert/update statements, a PreparedStatement or
Batch Updates?

Answers were Sorted based on User's Feedback



what is the best way, in terms of performance, to do multiple insert/update statements, a PreparedS..

Answer / ravi

It depends on the context. If you have many records that
need to be updated and you are not bothered about having
interactive session, I would choose batch. But that raises
the question, where do you store all the transactions that
need to be persisted/updated until the batch runs. Do you
want to store to a temporaray storage before updated. It
depends on the design on the system.

Is This Answer Correct ?    2 Yes 0 No

what is the best way, in terms of performance, to do multiple insert/update statements, a PreparedS..

Answer / nirmal

The easiest way is to use RMI to start the app and check to
see if it's already running.

The basic structure is this:

The main method of your app checks the RMI registry to see
if the app is started. If so, exit.
Otherwise, the main creates an instance of the app (which
is a remote object) and registers it in the RMI registry.
The class' constructor creates the GUI and displays it.
Alternatively, you could create a "start" method that you
call via RMI to start the app.

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More JDBC Interview Questions

What is an advantage of using the jdbc connection pool?

0 Answers  


How to execute bulk number of queries at once?

3 Answers   Wipro,


How can we store the file in the oracle database?

0 Answers  


Which type of driver provides jdbc access via one or more odbc drivers?

0 Answers  


What is the limitation of PreparedStatement and how to overcome it?

0 Answers  


Hi to all.. well i want to make a standalone application which can use the concept of connection pooling, constraint is that i have not to use any application server like weblogic etc. Please help me out. Thaks in advance.

3 Answers   Huawei,


How can you retrieve data from the resultset using jdbc?

0 Answers  


Explain the necessary steps to connect to the database in java?

0 Answers  


How do find debugging problems related to JDBC API?

1 Answers  


Where jdbc drivermanager class is used?

0 Answers  


How do I retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column?

0 Answers  


What does jdbc do?

0 Answers  


Categories