An Introduction to JDBC
driver can communicate with multiple ODBC drivers. Each of the ODBC
drivers execute SQL statements for specific databases. The results are
sent back up the chain as before.
Fig.1
The JDBC/ODBC bridge was developed to take advantage of the large
number of ODBC enable data sources. The bridge converts JDBC calls to
ODBC calls and passes them to the appropriate driver for the backend
database. The advantage of this scheme is that applications can access
data from multiple vendors. However, the performance of a JDBC/ODBC
bridge is lower than a JDBC driver alone due to the added overhead. A
database call must be translated from JDBC to ODBC to a native API.
Fewer operations are required to use a JDBC driver without a bridge.
In Fig.2, the steps to access a database using a JDBC driver from an
applet are shown. The Gwe JDBC driver is used with the Mysql database.
The JDBC driver classes are first downloaded from the WWW host. Next,
the applet logic passes a JDBC call to a driver manager which in turns
passes the call to a JDBC driver. The JDBC driver opens a TCP/IP
connection with the Mysql database server. Data is transferred back
and forth via the connection. When database processing is complete,
the connection is closed.
Fig.2
The JDBC API can be used in applets and stand-alone applications. In
addition to the usual restrictions for applets, only connections from
a server from which the applet was downloaded are accepted. If the web
server and database server are not on the same machine, then the web
server must run a proxy service to route the database traffic. Stand
alone applications can give access to local information and remote
servers.
Installation:
The installation of the JDBC driver for the Mysql database is simple
and can be downloaded from Gwe Technologies at http://www.gwe.co.uk.
The copyright statement allows the redistribution of source and
binary, but is not identitical to the GNU license. Download the file -
exgweMysqlJDBC.0.9.2-src.tar.gz. It contains the source and class
files for Gwe Mysql JDBC driver.
The use of JDBC requires access to java.sql classes which were not
available in the pre 1.1 Java Development Kit. These classes have been
- « first
- ‹ previous
- of 7
- next ›
- last »