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

Can I get a null resultset?

0 Answers  


What protocol does jdbc use?

0 Answers  


What is jdbc connection string?

0 Answers  


How to know howmuch data is truncated?

0 Answers   Mastek,


How many isolation levels are supported in JDBC and what are they?

1 Answers  






Where can I find info, frameworks and example source for writing a JDBC driver?

0 Answers  


Give a way to check that all result sets have bin accessed and update counts are generated by execute method.

0 Answers  


Why we use while rs next ())?

0 Answers  


What are the three basic components of the odbc architecture?

0 Answers  


Explain Basic Steps in Writing a Java Program Using Jdbc?

0 Answers   Winsol Solutions,


What are the differences between setmaxrows(int) and setfetchsize(int)?

0 Answers  


how can we connect to db without using getConnection() method

4 Answers  


Categories