Java Reference
In-Depth Information
FIGURE 13.1
How JDBC works.
Sometimes you have a choice about which type of driver to use. You may also
have a choice about vendors. Clearly Type 3 and Type 4 drivers are easier to deploy
to a large number of client machines, since they do not require any code other than
the driver itself on the machines. A Type 1 driver is useful for learning how JDBC
works, including simple testing and prototyping. For production, a Type 1 driver is
the worst choice and should be considered only when no other option is available.
Not only does it require ODBC software correctly configured on the machine, it
also has the overhead of ODBC on top of whatever overhead JDBC carries. Beyond
this, generalizations become more difficult. A vendor's Type 2 driver may perform
dramatically better than its Type 4 driver. If it is not required to be deployed to
many client machines or if its performance advantages outweigh the deployment
difficulties, the Type 2 driver could be the better choice. A Type 3 driver with its
middleware server might be the best choice in a heterogeneous environment with
many different databases, particularly if it performs well. With a Type 3 driver, one
driver could be deployed to all client machines to provide access to all the databases
in the enterprise.
Search WWH ::




Custom Search