Driver taxonomy: Historically, Sun/Java defined four JDBC driver types (Type 1 through Type 4). Is this historical statement correct?

Difficulty: Easy

Correct Answer: Correct

Explanation:

Introduction / Context:JDBC drivers were categorized into four types, describing how Java applications communicate with databases. Knowing these types clarifies deployment dependencies and performance characteristics.

Given Data / Assumptions:

  • Type 1: JDBC-ODBC bridge.
  • Type 2: Native-API partly Java.
  • Type 3: Net-protocol all-Java middleware.
  • Type 4: Native-protocol all-Java (direct to DBMS).

Concept / Approach:Types signal trade-offs: portability vs. reliance on native code or middleware. Modern practice favors Type 4 for simplicity and portability; the old JDBC-ODBC bridge is deprecated/removed.

Step-by-Step Solution:Identify DBMS vendor’s driver type.Prefer Type 4 where possible for all-Java stacks.Avoid legacy Type 1 in modern JVMs.Validate features (XA, SSL, batching) per driver.Test performance with representative workloads.

Verification / Alternative check:Consult vendor docs; confirm driver class and connection URL reflect a Type 4 implementation in most modern stacks.

Why Other Options Are Wrong:There were not two or five official categories; the canonical set is four.

Common Pitfalls:Assuming “Type 4” always outperforms others without testing; ignoring SSL/cert requirements.

Final Answer:Correct

More Questions from JDBC, Java Server Pages, and MySQL

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion