What is the actual difference between type2 and type 4 drivers in Jdbc

I listened that type 2 driver needs some apis database library. I can not understand the above can you explain?

+5
source share
3 answers

This link details the difference between the 4 types of drivers. You can take a look at it.

A type 2 driver is database specific, as stated in the article in the link above:

jdbc 2 , 2 JDBC , , . jdbc 2. : Oracle api.

+1

. : JDBC

2: , DB2 , JDBC, DB2. , , ODBC.

4: /.

+1

, 2 apis.

Yes. Type 2 drivers convert JDBC calls to database-specific calls, as it is database-specific. For example, Oracle will have its own oracle driver API. While Type 4 uses java-network libraries for direct communication with the database server.

0
source

All Articles