Java Reference
In-Depth Information
sponds in the affirmative gets to handle the connection, and its connect() method is called
for you (by DriverManager.getConnection() ).
Four types of drivers are defined (not in the JDBC specification but in the less formal docu-
mentation); these are shown in Table 18-1 .
Table 18-1. JDBC driver types
Type Name
Notes
1
JDBC-ODBC bridge
Provides JDBC API access.
2
Java and Native driver Java code calls Native DB driver.
3
Java and Middleware
Java contacts Middleware server.
4
Pure Java
Java contacts (possibly remote) DB directly.
Table 18-2 shows some interesting drivers. I'll use the ODBC bridge driver and InstantDB in
examples for this chapter. Some drivers work only locally (like the JDBC-ODBC bridge),
whereas others work across a network. For details on different types of drivers, refer to the
books referenced at the end of this chapter. Most of these drivers are commercial products.
InstantDB is a clever freeware [ 54 ] product; the driver and the entire database management
system reside inside the same Java Virtual Machine as the client (the database is stored on
disk like any other, of course). This eliminates the interprocess communication overhead of
some databases. However, you can't have multiple JVM processes updating the same data-
base at the same time.
 
Search WWH ::




Custom Search