Upcoming Events

Cloud Connect
Santa Clara
Feb 13-16, 2012

Cloud Connect brings together the entire cloud eco-system to better understand the transformation we're experiencing and promises to be the defining event of the cloud computing industry. Learn about the latest cloud technologies and platforms from thought leaders in Cloud Connect’s comprehensive conference.

Register Now!

More Events »

Subscribe to Newsletter

  • Keep up with all of the latest news and analysis on the fast-moving IT industry with Network Computing newsletters.
Sign Up




Java Connectivity With JDBC
May 3, 1999
Additional Information
Side Bars
OnLine Only
Behind the Scenes With JDBC

PDF Chart
JDBC Driver Types

Other Workshops
this issue
Layer 4 Switching: Unraveling the 'Vendorspeak'
By Joel Conover

Understanding Internet Payment Protocols
By Brian Walsh

Company Directory
Browse our directory to get data, starting with a particular company.
Reader Service
Allows you to request additional product information from our advertisers.
Print The Full Article
ClickHere
E-mail this URL
Clicke-mailHere
Buy the Book
By Ahmad Abualsamid  Java Database Connectivity (JDBC) was designed by Sun Microsystems to give Java programmers the ability to issue and process SQL. Using a small library of code, JDBC dispatches an appropriate driver (typically provided by a third party) to communicate with the database. But because it is merely an API and driver manager, it cannot handle database communication on its own (see "The JDBC Model" below).

Enter the JDBC driver, which is designed with database communication in mind. But all JDBC drivers are not created equal. So which JDBC driver should you use? Here we explain the current crop of JDBC drivers and present the issues that you can expect to encounter when developing and maintaining JDBC-based applications.

Four types of JDBC drivers are available, each with its own assets and drawbacks (see " JDBC Driver Types" in PDF format), but all are relatively new and will undoubtedly undergo some revisions. Some of the explanations we present are a bit more complicated than writing the actual code and involve decisions that may be beyond programming, but the background will be beneficial for administrators and programmers alike.

The JDBC-ODBC Bridge The Type 1 driver is the JDBC-ODBC bridge. Microsoft Corp.'s ODBC (Open Database Connectivity) API is the de facto standard for accessing a relational database. Short of using native access protocols--which are neither easy nor portable--ODBC is the next best thing to a standard. Given that ODBC is so widely used, the easiest way to connect JDBC to popular databases is to create bridging software between it and ODBC. Unfortunately, ODBC drivers are not written in Java. So a fair amount of native binary code--including installation and maintenance information--must reside on every client machine requiring access. Obviously, this is not an ideal solution for the Java paradigm of applets downloadable from the network.

Typically, an ODBC driver is loaded as a local DLL (Dynamic Link Library), which cannot access a data store over the network. Hence, almost all JDBC-ODBC bridges are used locally for development purposes. You can use a JDBC-ODBC driver in a networked environment by employing RMI (Remote Method Invocation), which mimics a local connection to the remote database. The RMI package makes the connection to the remote machine, executes the query and brings the results to the local machine. Programmers familiar with RPCs (Remote Procedure Calls) will feel at home using RMI.

Note, however, that not all browsers support RMI. Recent versions of Netscape Communications' browser and Sun's HotJava have no problem with RMI (it's built in). But Microsoft didn't build support for RMI into its Internet Explorer (IE). Here's a little-known fact that may help: With IE versions 4.71.1712.6 and later you can download a small ZIP file from Microsoft's ftp site (ftp://ftp.microsoft.com/ developr/ msdn/ unsup-ed /rmi.zip) and uncompress it to \windows\ java\ classes (or \winnt\java\ classes for Windows NT) for RMI support in IE.


Page 1 | 2 | 3 | Next Page

Research and Reports

Hypervisor Derby
August 2011

Network Computing: August 2011

TechWeb Careers