JDBC Driver Types

This section provides some quick information about different types of JDBC drivers.

JDBC drivers can be implemented in 4 ways. So JDBC drivers are divided into 4 types:

JDBC Type 1: JDBC-ODBC Bridge plus ODBC Driver. See the left side of the first picture shown below. This combination provides JDBC access via ODBC drivers. ODBC binary code, and in many cases, database client code, must be loaded on each client machine that uses a JDBC-ODBC Bridge. Sun provides a JDBC-ODBC Bridge driver, which is appropriate for experimental use and for situations in which no other driver is available.

JDBC Type 2: A native API partly Java technology-enabled driver. See the right side of the first picture shown below. This type of driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires that some binary code be loaded on each client machine.

Below is an integration diagram of JDBC Type 1 and 2:

JDBC Drivers: Type 1 and 2
JDBC Drivers: Type 1 and 2

JDBC Type 3: Pure Java Driver for Database Middleware. See the right side of the second picture shown below. This style of driver translates JDBC calls into the middleware vendor's protocol, which is then translated to a DBMS protocol by a middleware server. The middleware provides connectivity to many different databases.

JDBC Type 4: Direct-to-Database Pure Java Driver. See the left side of the second picture shown below. This style of driver converts JDBC calls into the network protocol used directly by DBMSs, allowing a direct call from the client machine to the DBMS server and providing a practical solution for intranet access. For example, Microsoft JDBC Driver 1.0 is a Type 4 JDBC driver.

Below is an integration diagram of JDBC Type 3 and 4:

JDBC Drivers: Type 3 and 4
JDBC Drivers: Type 3 and 4

Table of Contents

 About This Book

JDBC (Java Database Connectivity) Introduction

 What Is JDBC?

 JDBC Version and History

JDBC Driver Types

 Establishing Connections from JDBC to Databases

 DriverManager - Loading JDBC Driver

 DriverManager - Connection URL

 JDK (Java SE) Installation

 Microsoft SQL Server Express Edition

 Microsoft JDBC Driver for SQL Server

 Microsoft JDBC Driver - Query Statements and Result Sets

 Microsoft JDBC Driver - DatabaseMetaData Object

 Microsoft JDBC Driver - DDL Statements

 Microsoft JDBC Driver - DML Statements

 SQL Server - PreparedStatement

 SQL Server CLOB (Character Large Object) - TEXT

 SQL Server BLOB (Binary Large Object) - BLOB

 JDBC-ODBC Bridge Driver - sun.jdbc.odbc.JdbcOdbcDriver

 JDBC-ODBC Bridge Driver - Flat Text Files

 JDBC-ODBC Bridge Driver - MS Access

 JDBC-ODBC Bridge Driver - MS SQL Server

 Archived Tutorials

 References

 Full Version in PDF/EPUB