JDBC Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to JDBC Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : C

Explanation

General JDBC Architecture consists of two layers: JDBC API (This provides the application-to-JDBC Manager connection) and JDBC Driver API (This supports the JDBC Manager-to-Driver Connection).

Q 2 - Which of the following gives out the connection to the database and implements the protocol for transferring the query and result between client and database?

A - DriverManager

B - JDBC driver

C - Connection

D - Statement

Answer : B

Explanation

JDBC driver gives out the connection to the database and implements the protocol for transferring the query and result between client and database.

Q 3 - Which of the following type of JDBC driver, calls database vendor native library on a client side. This code then talks to database over network?

A - JDBC-ODBC Bridge plus ODBC driver

B - Native-API, partly Java driver

C - JDBC-Net, pure Java driver

D - Native-protocol, pure Java driver

Answer : B

Explanation

Native-API, partly Java driver calls database vendor native library on a client side. This code then talks to database over network.

Answer : C

Explanation

The JDBC API provides the abstraction and the JDBC drivers provide the implementation. New drivers can be plugged-in to the JDBC API without changing the client code.

Q 5 - Which of the following is used to call stored procedures on the database?

A - Statement

B - PreparedStatement

C - CallableStatement

D - None of the above.

Answer : C

Explanation

CallableStatement is used to call stored procedures on the database.

Answer : D

Explanation

All of the above stands true.

Answer : C

Explanation

The ResultSet concurrency determines whether the ResultSet can be updated, or only read.

Answer : D

Explanation

Statement is used for general-purpose access to your database. Useful when you are using static SQL statements at runtime. The Statement interface cannot accept parameters.

Q 9 - Which of the following a valid type of RowSet objects?

A - Connected

B - Disconnected

C - Both of the above.

D - None of the above.

Answer : C

Explanation

There are two types of RowSet: 1) Connected. 2) Disconnected.

Q 10 - The JDBC API provides the abstraction and the JDBC drivers provide the implementation.

A - true

B - false

Answer : A

Explanation

The JDBC API provides the abstraction and the JDBC drivers provide the implementation.


jdbc_questions_answers.htm

Advertisements
E-Books Store