How many types of jdbc drivers are present and what are they




















Here, we need to install The vendor-specific driver on the client machines. If we change the Database, we have to change the native API, as it is specific to a database and they are mostly obsolete now, but you may realize some speed increase with a Type 2 driver because it eliminates ODBC's overhead. On the client machine, the Java Application calls are converted into vendor-specific database calls.

Therefore, we must install native libraries on the client machine. Since the native functions are executed on the client machine a small error in their execution can cause severe damage. In a Type 3 driver, a three-tier approach is used to access databases. The JDBC clients use standard network sockets to communicate with a middleware application server. The socket information is then translated by the middleware application server into the call format required by the DBMS, and forwarded to the database server.

This kind of driver is extremely flexible, since it requires no code installed on the client, a single driver can actually provide access to multiple databases.

Send queries and update statements to the database Retrieve and process the results received from the database in answer to your query Structure of JDBC. Skip to content. Change Language.

Related Articles. Table of Contents. Save Article. Improve Article. Like Article. Network protocol driver or Type-3 driver is a driver that uses a middleware in order to convert method calls of JDBC into vendor-specific DB protocol. It is also known as a pure driver and follows a 3-tier communication approach in order to communicate with several databases.

A standard network socket is needed by the clients of JDBC to communicate with the application server of middleware. The information or data obtained from the socket is then converted into to call format by the application server of middleware and forwards to the database. However, the supply of networks is needed on the client-side. Application: Used at the same time where the java applications access different types of databases. Type 4 driver or Thin driver is a driver that is purely Java-based that interacts directly with the database of the vendor using a socket connection.

It is also known as Direct to Database Pure Java Driver and considered as the driver with the highest performance for the database. The thin driver is usually offered by the vendor. Since it is very flexible, special software is not needed to install on the client as well as server sides. Moreover, these drivers are possible to dynamically download. DB vendors commonly supply this type of driver due to their proprietary nature.

Application: Used at the time where the java applications access only one type of database such as IBM, Sybase, Oracle, etc.



0コメント

  • 1000 / 1000