Type-1 JDBC-ODBC Bridge driver.

  • The Type 1 driver translates all JDBC calls into ODBC calls and sends them to the ODBC driver. ODBC is a generic API.
  • The JDBC-ODBC Bridge driver is recommended only for experimental use or when no other alternative is available.
  • Advantage :
    The JDBC-ODBC Bridge allows access to almost any database, since the database's ODBC drivers are already available.
    Disadvantage :
    • 1. Since the Bridge driver is not written fully in Java, Type 1 drivers are not portable.
    • 2. A performance issue is seen as a JDBC call goes through the bridge to the ODBC driver, then to the database, and this applies even in the reverse process. They are the slowest of all driver types.
    • 3. The client system requires the ODBC Installation to use the driver.
    • 4. Not good for the Web.


    Type-2 Native-API Partly-Java driver.

    The distinctive characteristic of type 2 jdbc drivers are that Type 2 drivers convert JDBC calls into database-specific calls i.e. this driver is specific to a particular database. Some distinctive characteristic of type 2 jdbc drivers are shown below. Example: Oracle will have oracle native api.
    Advantages:
    The distinctive characteristic of type 2 jdbc drivers are that they are typically offer better performance than the JDBC-ODBC Bridge as the layers of communication (tiers) are less than that of Type-1 and also it uses Native api which is Database specific.
    Disadvantages:
    • 1. Native API must be installed in the Client System and hence type 2 drivers cannot be used for the Internet.
    • 2. Like Type 1 drivers, it's not written in Java Language which forms a portability issue.
    • 3. If we change the Database we have to change the native api as it is specific to a database
    • 4. Mostly obsolete now
    • 5. Usually not thread safe.