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:
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
Discussion & Comments