Difficulty: Easy
Correct Answer: Both Type 3 and Type 4
Explanation:
Introduction:
Choosing the right JDBC driver in a multi-tier architecture affects portability, performance, and operational simplicity. Pure Java drivers avoid native dependencies and are easier to deploy, especially across clustered or containerized environments.
Given Data / Assumptions:
Concept / Approach:
Type 3 drivers use a middleware server; Type 4 drivers speak the DB wire protocol directly. Both run without native code, which simplifies deployment and scaling. Type 1 (JDBC-ODBC bridge) is obsolete and requires ODBC. Type 2 requires native libraries and complicates deployment and maintenance. Thus, Type 3 and Type 4 are the typical best choices in three-tier setups, regardless of server co-location with the DBMS.
Step-by-Step Solution:
1) Prefer pure Java drivers for portability and ease of deployment.2) Discard Type 1 (legacy/ODBC) and Type 2 (native code).3) Select “Both Type 3 and Type 4.”
Verification / Alternative check:
Modern vendor guidance and practice overwhelmingly favor Type 4 in particular; Type 3 is also acceptable where middleware fits the architecture.
Why Other Options Are Wrong:
Common Pitfalls:
Underestimating deployment friction from native dependencies in scaled-out environments.
Final Answer:
Both Type 3 and Type 4
Discussion & Comments