JDBC, Java Server Pages, and MySQL - Technical MCQs

Q1:

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?

A Type 1 only

B Type 2 only

C Both Type 3 and Type 4

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

ANS:D - All of Type 1, Type 2, Type 3 and Type 4

4 type.

4. 100%pure java.

If you are accessing one type of database, such as Oracle, Sybase, or IBM, the preferred driver type is 4.

3. jdbc-net pure java.

If your Java application is accessing multiple types of databases at the same time, type 3 is the preferred driver.

2. JDBC-NATIVE API.

Type 2 drivers are useful in situations where a type 3 or type 4 driver is not available yet for your database.

1. JDBC-ODBC BRIDGE DRIVE.

The type 1 driver is not considered a deployment-level driver and is typically used for development and testing purposes only.