aspose file tools*
The moose likes JDBC 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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Difference between Type I and Type II drivers." Watch "Difference between Type I and Type II drivers." New topic
Author

Difference between Type I and Type II drivers.

Vishal Saxena
Greenhorn

Joined: Apr 23, 2003
Posts: 26
hello,
From java.sun.com:
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.
Dan
Vishal Saxena
Greenhorn

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 !
regards,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between Type I and Type II drivers.