JDBC Quiz

Description: Java - JDBC Quiz
Number of Questions: 4
Created by:
Tags: java jdbc
Attempted 0/4 Correct 0 Score 0

How many JDBC driver types does Sun define?

  1. One

  2. Two

  3. Three

  4. Four


Correct Option: D

Where is metadata stored in MySQL?

  1. In the MySQL databasemetadata

  2. In the MySQL databasemetasql

  3. In the MySQL databasemysql

  4. None of the above is correct.


Correct Option: C

Which JDBC driver Type(s) can be used in either applet or servlet code?

  1. Both Type 1 and Type 2

  2. Both Type 1 and Type 3

  3. Both Type 3 and Type 4

  4. Type 4 only


Correct Option: C

AI Explanation

To answer this question, we need to understand the different types of JDBC drivers and their compatibility with applet and servlet code.

Option A) Both Type 1 and Type 2 - This option is incorrect because neither Type 1 nor Type 2 JDBC drivers can be used in either applet or servlet code.

Option B) Both Type 1 and Type 3 - This option is incorrect because although Type 1 JDBC drivers can be used in applet or servlet code, Type 3 JDBC drivers cannot.

Option C) Both Type 3 and Type 4 - This option is correct because both Type 3 and Type 4 JDBC drivers can be used in either applet or servlet code.

Option D) Type 4 only - This option is incorrect because Type 4 JDBC drivers can be used in applet or servlet code, but it is not the only type that can be used.

The correct answer is C) Both Type 3 and Type 4. This option is correct because both Type 3 and Type 4 JDBC drivers can be used in either applet or servlet code.

Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web server and the DBMS are running on the same machine?

  1. Type 1 only

  2. Type 2 only

  3. Both Type 3 and Type 4

  4. All of Type 1, Type 2, Type 3 and Type 4


Correct Option: D
- Hide questions