What is type4 driver of JDBC what are the advantages and disadvantages of it?

The Type 4 driver is the pure Java driver. It implements database specific protocol to communicate with the database directly. This driver is provided by the vender itself, this is flexible driver compared to other drivers.

Advantages of type4 driver

Following are the advantages of the type4 driver.

  • It is purely developed in Java and it is the platform independent driver.

  • Unlike type-1 driver there is no need to install OCI, ODBC functions.

  • While using this driver there is no need for middleware server.

Disadvantages of type4 driver

Following are the disadvantages of type4 driver.

  • Type-4 driver internally uses database specific proprietary protocol and it is database dependent. Therefore, whenever the database changed we need to change the driver accordingly.