About Question enthuware.ocpjp.v7.2.1370 :
Posted: Fri Jun 26, 2015 12:46 pm
Answers and comments seem to be quite vague.
It might seems that the question appeals to the advantages of stored procedures running in DB over the same algorithm first fetching data from DB then running in Java. This is often told to be the objective of introducing SPs to DB, and the answer seems to test knowing of this.1. One advantage of CallableStatement is that it runs on the database.
- All queries run on the database.
Java program may employ any other DB framework that does not use CallableStatement directly. Maybe replace "for a Java program" to "in JDBC"?4. A CallableStatement is the only way for a Java program to execute stored procedures in the database (...)