Tuesday, 5 February 2013

TYPES OF DRIVERS | Java J2EE Tutorial pdf

TYPES OF DRIVERS

JDBC drivers are divided into four types or levels. Each type defines a JDBC driver implementation with increasingly higher levels of platform independence, performance, and deployment administration. The four types are:
=> Type 1: JDBC-ODBC Bridge
=> Type 2: Part Java Part Native Driver
=> Type 3: The Network Protocol Driver
=> Type 4: Pure Java driver
Type 1: JDBC-ODBC Bridge
Type 2: Part Java Part Native Driver
Type 2 driver use a mixture of java implementation and vendor specific native APIs to provide data access. JDBC database calls are translated into vendor-specific API calls. The database will process the request and send the result back through the API ,which will turn forward back to the JDBC driver. The JDBC driver will translate the result and return to java program. Part Java Part Native Driver and the vendor specific native language API must be installed on every client that runs the java program.
Type 3: The Network Protocol Driver
Type-3 drivers use an intermediate database server that has the ability to connect multiple java clients to multiple database servers. Client connects to database servers via an intermediate server component that acts as a gateway for multiple database servers. The java client application sends a jdbc call through a jdbc driver to the intermediate data access server, which completes the request to the datasource using another driver.
Type 4: Pure Java driver
JDBC driver type 4 converts JDBC calls into the vendor-specific database management system (DBMS) protocol so that client applications can communicate directly with the database server. 
Level 4 drivers are completely implemented in Java to achieve platform independence and eliminate deployment administration issues.

No comments: