File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Difference between Type I and Type II drivers. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Difference between Type I and Type II drivers." Watch "Difference between Type I and Type II drivers." New topic

Difference between Type I and Type II drivers.

Vishal Saxena

Joined: Apr 23, 2003
Posts: 26
1.A JDBC-ODBC bridge provides JDBC API access via one or more ODBC drivers. Note that some ODBC native code and in many cases native database client code must be loaded on each client machine that uses this type of driver. Hence, this kind of driver is generally most appropriate when automatic installation and downloading of a Java technology application is not important. For information on the JDBC-ODBC bridge driver provided by Sun, see JDBC-ODBC Bridge Driver.

2.A native-API partly Java technology-enabled 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.
ODBC for MS SQL Server is analogous to Oracle Client for Oracle. Then the two types become the same.
Please explain.
Thanks In Advance.

Thx -V
Daniel Dunleavy
Ranch Hand

Joined: Mar 13, 2001
Posts: 276
note: I am not sure exactly what you are asking and if my answer is fully correct.
Odbc has overhead and within it you must load the database driver within it. ODBC is a standard and the vendors are supposed to adhere to it, but this may not take advantage of all the databases features.
a native driver should be somewhat similar to the driver loaded into odbc but probably more effecient.
Vishal Saxena

Joined: Apr 23, 2003
Posts: 26
Moving Forward,
Like for Type 3 it's over the net protocol and for Type 4 it's over the network protocol, for Type 1 & 2 it is the native calls; 1 would be calling APIs exposed by ODBC and may be some direct DB talk too, 2 would be calling native client APIs; that's what I understand.
Since client(Oracle client et. al) don't follow the ODBC standard, does that distinguish 1 & 2?
May be somebody could name a driver each of every type and also get me the .class file, I can then decompile them and look into what's happening !
I agree. Here's the link:
subject: Difference between Type I and Type II drivers.
It's not a secret anymore!