0% found this document useful (0 votes)
17 views

JDBC Java Database Connectivity

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

JDBC Java Database Connectivity

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

JDBC-ODBC bridge driver – Type 1 driver

1. Type-1 driver or JDBC-ODBC bridge driver uses ODBC driver to connect to the database. The
JDBC-ODBC bridge driver converts JDBC method calls into the ODBC function calls. Type-1
driver is also called Universal driver because it can be used to connect to any of the
databases.
2. This driver software is built-in with JDK so no need to install separately.
3. It is a database independent driver.
4. As a common driver is used in order to interact with different databases, the data transferred
through this driver is not so secured.
5. The ODBC bridge driver is needed to be installed in individual client machines.
6. Type-1 driver isn’t written in java, that’s why it isn’t a portable driver.

2. Native-API driver – Type 2 driver ( Partially Java driver)

1. The Native API driver uses the client -side libraries of the database. This driver converts JDBC
method calls into native calls of the database API. In order to interact with different
database, this driver needs their local API, that’s why data transfer is much more secure as
compared to type-1 driver. This driver is not fully written in Java that is why it is also called
Partially Java driver.
2. Native-API driver gives better performance than JDBC-ODBC bridge driver.
3. Driver needs to be installed separately in individual client machines
4. The Vendor client library needs to be installed on client machine.
5. Type-2 driver isn’t written in java, that’s why it isn’t a portable driver
6. It is a database dependent driver.

3. Network Protocol driver – Type 3 driver (fully Java driver)

1. The Network Protocol driver uses middleware (application server) that converts JDBC calls
directly or indirectly into the vendor-specific database protocol. Here all the database
connectivity drivers are present in a single server, hence no need of individual client-side
installation.
2. Type-3 drivers are fully written in Java, hence they are portable drivers.
3. No client side library is required because of application server that can perform many tasks
like auditing, load balancing, logging etc.
4. Switch facility to switch over from one database to another database.
5. Network support is required on client machine.
6. Maintenance of Network Protocol driver becomes costly because it requires database-
specific coding to be done in the middle tier.

4. Thin driver – Type 4 driver (fully Java driver)

1. Type-4 driver is also called native protocol driver. This driver interact directly with database.
It does not require any native database library, that is why it is also known as Thin Driver.
2. Does not require any native library and Middleware server, so no client-side or server-side
installation.
3. It is fully written in Java language, hence they are portable drivers.
4. If the database varies, then the driver will carry because it is database dependent.

You might also like