Saturday, February 3, 2007

Difference between Type-2 and Type-3 driver ?

a. Type 2 driver is part Native-part Java driver. It is also one of the thin drivers. After the java calls are converted into JDBC calls by using the JDBC API, and those calls use the vendor specific API and connected to Database to get the results.
Type 3 is Medium Access Sub Layer driver. After the calls are converted to JDBC calls by using JDBC API, they are forwarded to another driver(either type 2 or type 4) and from there it goes to the Database to get the results.

b. Type-2 driver is Part Java Part Native Driver. This driver is a mixture of Jdbc driver and Vendor speciifc driver . You not only use ODBC to communicate with DataBase. You can also use Vendor specif Apis like Oracle Call Level Interface (OCI) that is supplied by Oracle.When an application is sent to the Jdbc driver this driver sends this request to Vendor specific api and that inturn communicates with the Database.
Type-3 driver is Intermediate Access Protocol Driver where as in this case when an application is sent to the JDBC Driver and that is sent to another intermediate acess servers and that inturn is sent to another native driver (can be an Type-2 driver) and then the request is sent to Database.

SOURCE : www.referjava.com

No comments: