What are the types of JDBC driver?

Type-1(JDBC-ODBC bridge Driver):
•This driver creates bridge between JDBC and other call level interface (ODBC).
•JDBC-ODBC Bridge driver used to translate DBMS calls between JDBC specification and ODBC specification.First this driver receives message from a j2ee, those msgs are translated to ODBC msg and then translated to a format that is understood by DBMS.
•Given by Microsoft.


•Suitable for all windows os.
•It is easy to use and maintain.
•It does not work in non windows os.
•Due to number of convertion the performance is reduced.
•Bridge solutions (like odbc)generally require software to be installed on client systems.
•It is restricted to connect only local network and stand alone application.
Type-2(java native driver):
•It uses java classes to generate platform specific code that is understood by DBMS.
•It directly converts the JDBC code to database specific code.


•Provides better performance than type-1.
•Portable to all os.
•It can be used in server side application.
•Driver implementation is specific to one database. If we want to shift from one database to other we have to do some environmental changes.
•The vender database library is needed in each client machine.
•It uses native code like c. Maintanance is costlier because fault finding is difficult to dealing with native libraries.
•Suitable to all types of Java applications (Standalone, Web,Distributed, Enterprise and Integration) except Applets.

Type-3(java net driver)
•The type-3 driver uses an intermediate server(Ex-IDS server) that is capable of connecting java clients with multiple database servers.
•This driver translates JDBC calls into a DBMS-independent net protocol, which is then translated to a DBMS protocol by a server.
•This net server middleware is able to connect its pure Java clients to many different databases.
•The driver avails flexibility of connecting java application to different database servers.


•Suitable for internet application. More suitable to Applets when they are connecting the DB because no native libraries need to be installed on client system
•No native library needed in the client system.
•Any changes to the database configuration does not affect the client.
•It is little bit slow because of 3tier application.
•It needs a middlewire which may increase the cost of the application.

Type-4(Java Native protocol driver)
•This kind of driver converts JDBC calls directly into the network protocol used by DBMS. This allows a direct call from the client machine to the DBMS server.
•Here the driver creates socket from application to database server.
•These are purely java implementation drivers.


•It is a light weight java driver.
•No native library is needed to be installed in the client system.
•Comes with database installation.
•Uses database specific network protocol because it is safe to transfer data.
•Slower in execution compared with Type II and Type I but faster
than III.

No comments:

Post a Comment