JDBC driver
A JDBC driver is a software component enabling a Java application to interact with a database.[src] JDBC drivers are analogous to ODBC drivers, ADO.NET data providers, and OLE DB providers.[src] To connect with individual databases, JDBC (the Java Database Connectivity API) requires drivers for each database.[src] The JDBC driver gives out the connection to the database and implements the protocol for transferring the query and result between client and database.[src] JDBC technology drivers fit into one of four categories.[src] # JDBC-ODBC bridge # Native-API driver # Network-Protocol driver (Middleware driver) # Database-Protocol driver (Pure Java driver) or thin driver.[src]
A JDBC driver is a software component enabling a Java application to interact with a database.[src] JDBC drivers are analogous to ODBC drivers, ADO.NET data providers, and OLE DB providers.[src] To connect with individual databases, JDBC (the Java Database Connectivity API) requires drivers for each database.[src] The JDBC driver gives out the connection to the database and implements the protocol for transferring the query and result between client and database.[src] JDBC technology drivers fit into one of four categories.[src] JDBC-ODBC bridge Native-API driver Network-Protocol driver (Middleware driver) Database-Protocol driver (Pure Java driver) or thin driver.[src] ===Advantages=== Almost any database for which an ODBC driver is installed can be accessed, and data can be retrieved.[src] ===Disadvantages=== Performance overhead since the calls have to go through the JDBC (java database connectivity) bridge to the ODBC (open database connectivity) driver, then to the native database connectivity interface (thus may be slower than other types of drivers).[src] The ODBC driver needs to be installed on the client machine.[src] Not suitable for applets, because the ODBC driver needs to be installed on the client.[src] Specific ODBC drivers are not always available on all platforms; hence, portability of this driver is limited.[src] No support from JDK 1.8 (Java 8).[src] ==Type 2 driver – Native-API driver== The JDBC type 2 driver, also known as the Native-API driver, is a database driver implementation that uses the client-side libraries of the database.[src] The driver converts JDBC method calls into native calls of the database API.[src] For example: Oracle OCI driver is a type 2 driver.[src] ===Advantages=== As there is no implementation of JDBC-ODBC bridge, it may be considerably faster than a Type 1 driver.[src] ===Disadvantages=== The vendor client library needs to be installed on the client machine.[src] Not all databases have a client-side library.[src] This driver is platform dependent.[src] This driver supports all Java applications except applets.[src] ===Functions=== Sends JDBC API calls to a middle-tier net server that translates the calls into the DBMS-specific network protocol.[src] The translated calls are then sent to a particular DBMS.[src] Follows a three-tier communication approach.[src] Can interface to multiple databases – Not vendor specific.[src] The JDBC Client driver written in java, communicates with a middleware-net-server using a database independent protocol, and then this net server translates this request into database commands for that database.[src] Thus the client driver to middleware communication is database independent.[src] ===Advantages=== Since the communication between client and the middleware server is database independent, there is no need for the database vendor library on the client.[src] The client need not be changed for a new database.[src] The middleware server (which can be a full-fledged J2EE Application server) can provide typical middleware services like caching (of connections, query results, etc.), load balancing, logging, and auditing.[src] A single driver can handle any database, provided the middleware supports it.[src] E.g.: IDA Server ===Disadvantages=== Requires database-specific coding to be done in the middle tier.[src] The middleware layer added may result in additional latency, but is typically overcome by using better middleware services.[src] ==Type 4 driver – Database-Protocol driver/Thin Driver (Pure Java driver)== The JDBC type 4 driver, also known as the Direct to Database Pure Java Driver, is a database driver implementation that converts JDBC calls directly into a vendor-specific database protocol.[src] Written completely in Java, type 4 drivers are thus platform independent.[src] They install inside the Java virtual machine of the client.[src] This provides better performance than the type 1 and type 2 drivers as it does not have the overhead of conversion of calls into ODBC or database API calls.[src] Unlike the type 3 drivers, it does not need associated software to work.[src] As the database protocol is vendor specific, the JDBC client requires separate drivers, usually vendor supplied, to connect to different types of databases.[src] ===Advantages=== Completely implemented in Java to achieve platform independence.[src] These drivers don't translate the requests into an intermediary format (such as ODBC).[src] The client application connects directly to the database server.[src] No translation or middleware layers are used, improving performance.[src] The JVM can manage all aspects of the application-to-database connection; this can facilitate debugging.[src] ===Disadvantages=== Drivers are database specific, as different database vendors use widely different (and usually proprietary) network protocols.[src] ==See also== ADO.NET OLE DB Open Database Connectivity (ODBC) XQJ (XQuery API for Java) ==References==[src]
51 sentences · 51 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"JDBC driver." encyclopegia.org, 2026, https://encyclopegia.org/wiki/jdbc-driver. Accessed 29 November 2026.
Chicago
"JDBC driver." encyclopegia.org. Accessed November 29, 2026. https://encyclopegia.org/wiki/jdbc-driver.
APA
encyclopegia.org. (2026). JDBC driver. Retrieved November 29, 2026, from https://encyclopegia.org/wiki/jdbc-driver
Accessed November 29, 2026 · CC BY-SA 4.0 · citation page · JSON