As a part of JDBC, Sun (now Oracle) also delivers a driver to access ODBC data sources from JDBC. This driver is jointly developed with Intersolv and is called the JDBC-ODBC Bridge. The JDBC-ODBC is implemented as the JdbcOdbc.class and native library to access the ODBC driver. For the Windows platform, the native library is DLL (JDBCODBC.dll).
Because JDBC is close to ODBC in design, the ODBC Bridge is a thin layer over JDBC. Internally, this driver maps JDBC methods to ODBC calls and, thus, interacts with any available ODBC driver. The advantage of this bridge is that now JDBC has the capability to access almost all databases, as ODBC drivers are widely available.
When you look at the class hierarchy and methods associated with it, the topmost class in the hierarchy is the DriverManager. The DriverManager keeps the driver information, state information, and more. When each driver is loaded, it registers with the DriverManager. The DriverManager, when required to open a connection, selects the driver depending on the JDBC URL.



No comments:
Post a Comment