JDBC  «Prev  Next»

Batch Updates Prepared Statements - Quiz

Each question is worth one point. Select the best answer or answers for each question.
1. 1. Batch updates are helpful because they can do which of the following?
Please select the best answer.
  A. A. Help reduce the processing involved in database-JDBC communications
  B. Help increase the processing speed of the database
  C. Allow more JDBC driver options
  D. Allow better security control over data access

2. Prepared statements provide which of the following advantages?
Please select the best answer.
  A. They allow more a general way to register a driver and supply user information.
  B. They give developers a way to automatically generate and execute JDBC programs.
  C. They allow more flexible programs and provide a performance boost.
  D. They give developers a way to monitor and trace JDBC calls.

3. Which of the following are true about JDBC?
Please select the best answer.
  A. JDBC stands for Java Database Connectivity.
  B. JDBC is used to connect Java applications with databases.
  C. JDBC provides a standard API for accessing relational databases.
  D. JDBC can only be used to access MySQL databases.

4. Which of the following statements are true about prepared statements in JDBC?
Please select the best answer.
  A. Prepared statements are used to execute SQL statements multiple times with different values.
  B. Prepared statements can improve database performance by reducing the amount of data sent over the network.
  C. Prepared statements can prevent SQL injection attacks.
  D. Prepared statements can only be used for SELECT statements.