Difficulty: Easy
Correct Answer: Four
Explanation:
Introduction / Context:
JDBC drivers historically have been grouped into “Types” that describe how a driver translates JDBC API calls into database-specific operations. Knowing the number and nature of these Types helps clarify compatibility and deployment implications for Java applications.
Given Data / Assumptions:
Concept / Approach:
There are four classic Types: Type 1 (JDBC-ODBC bridge), Type 2 (native-API partly Java driver), Type 3 (network protocol driver using middleware), and Type 4 (thin driver using native database protocol over the network). Modern practice overwhelmingly favors Type 4 drivers for portability and simple deployment.
Step-by-Step Solution:
Verification / Alternative check:
Check any mainstream JDBC driver documentation; the Type is often stated (for example, PostgreSQL and MySQL drivers are Type 4).
Why Other Options Are Wrong:
One/Two/Three: omit one or more established Types and do not reflect the historical taxonomy.
Common Pitfalls:
Assuming the Type determines feature completeness; real capability depends on the specific driver implementation and database.
Final Answer:
Four
Discussion & Comments