What is type 1,2,3 or 4 of a JDBC Driver?

前端 未结 5 583
终归单人心
终归单人心 2020-12-28 16:45

To connect to a database using Java, most of us use JDBC API.

We normally include driver like ojdbc14 (Intended for Java 1.4) in class path, and in pro

5条回答
  •  醉酒成梦
    2020-12-28 17:12

    +------+---------------------------------+-------------------------------------------------------------------------------------------+
    | Type |             Driver              |                                        Descripiton                                        |
    +------+---------------------------------+-------------------------------------------------------------------------------------------+
    |    1 | JDBC-ODBC Bridge (bridge)       | Translates all JDBC calls into ODBC calls.                                                |
    |    2 | Native API (native)             | Translates all JDBC calls into native API database calls. (e.g: DLL on windows using JNI) |
    |    3 | Network Protocol(middleware)    | Translates all JDBC calls into database independent middleware specific calls.            |
    |    4 | Native Protocol(pure java thin) | Translates all JDBC calls directly into database calls.                                   |
    +------+---------------------------------+-------------------------------------------------------------------------------------------+
    

提交回复
热议问题