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
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 |
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 |
What is metadata in java programming?
PreparedStatement is a pre compiled statement but where it's pre compiled ?
Can resultset be null in java?
What is jdbc odbc in java?
What are the different types of modifiers?
Compare jdbc and odbc and how is jdbc required in this context.
What's the benefit for specifying constraints like not null, primary key explicitly instead of specifying it against the column ?
What are the different types of drivers under jdbc?
What is the return type of execute, executequery and executeupdate?
What are the differences between statement and preparedstatement interface?
How to get the Database server details in java program?
how can we connect to db without using getConnection() method