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.
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.
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.