Java Reference
In-Depth Information
Type 3 drivers translate JDBC calls into a DBMS independent net protocol that is then
translated to a DBMS protocol by a server.
Advantages of Type 3 drivers are the following:
 
Type 3 drivers do not require any native binary code on the client.
 
Type 3 drivers do not need client installation.
 
Type 3 drivers support several networking options, such as HTTP tunneling.
A major drawback of Type 3 drivers is that they can be difficult to set up since the
architecture is complicated by the network interface.
Type 4: Native-protocol pure Java driver
The Type 4 driver is a native protocol, 100-percent Java driver. This allows direct
calls from a Java client to a DBMS server. Because the Type 4 driver is written in
100-percent Java, it requires no configuration on the client machine other than telling
your application where to find the driver. This allows a direct call from the client
machine to the DBMS server. Many of these protocols are proprietary, so these
drivers are provided by the database vendors themselves.
Native protocol pure Java drivers can be significantly faster than the JDBC ODBC
bridge. In Part II of this topic, performance of the Opta2000 driver from I-Net is
compared with the performance of the JDBC-ODBC bridge in a simple SQL Server
application. Although this comparison is not intended to be anything more than a
trivial indicator of the difference between the two, the Opta2000 driver's performance
is clearly faster.
Cross-Reference
To learn more about available drivers, you can visit the Web
site Sun maintains at:
http://java.sun.com/products/jdbc/industry.html
This Web site provides an up-to-date listing of JDBC-driver
vendors.
JDBC DataSource
The DataSource interface, introduced in the JDBC 2.0 Standard Extension API, is
now, according to Sun, the preferred alternative to the DriverManager class for
making a connection to a particular source of data. This source can be anything from
a relational database to a spreadsheet or a file in tabular format.
A DataSource object can be implemented in these three significantly different ways,
adding important and useful capabilities to the JDBC API:
Search WWH ::




Custom Search