Types of JDBC driver

What are the types of JDBC driver?

What is JDBC driver?

- It is a set of Java classes.
- It implements the defined interfaces in the JDBC API for targeting a specific database.

Following are the types of JDBC driver:

1. Type 1 : JDBC - ODBC bridge:

- It is used to access ODBC drivers installed on each client machine.
- ODBC requires a Data Source Name (DNS) for configuring on the system which represents a target database.
- This bridge comes with JDK 1.2 is a good example of this driver.

2. Type 2 : Native API partly Java technology enabled driver:

- In this type, JDBC API calls are converted into native C/C++ API calls, which are unique to the database.
- These drivers are provided by the database vendors and used in the JDBC - ODBC bridge.
- In this native API, if we change the particular database, then we have to change the native API.
- The Oracle Call Interface (OCI) driver is an example of a Type 2 driver.

3. Type 3 : Net - Protocol fully Java technology enabled driver.

- It is used to access databases.
- It provides access to multiple databases.
- It requires no code to install on the client.

4. Type 4 : Native - Protocol fully Java driver.

- It is a pure Java based driver.
- It communicates directly with the vendor's database through a socket connection.
- It is provided by the vendor itself.
- It is a flexible driver.
- It can be downloaded dynamically.
What is a connection pooling?
What is a connection pooling? - It is the technique which allows a connection object to be shared by multiple clients, thus improve program....
What is the difference between C++ & Java?
What is the difference between C++ & Java? - Java does not support typedefs, defines, or a preprocessor. The declaration of named constants is...
What is JAR file?
What is JAR file? - JAR is a Java Archived file which allows many files to be stored. All applets and classes can be stored...
Post your comment