Type 2 Driver
Type 2: JDBC-Native API/partly Java driver:
The JDBC type 2 driver, also known as the Native-API driver,
is a database driver implementation that uses the client-side libraries
of the database.
In a Type 2 driver, JDBC API
calls are converted into native C/C++ API calls which are unique to the
database. These drivers typically provided by the database vendors and
used in the same manner as the JDBC-ODBC Bridge, the vendor-specific
driver must be installed on each client machine.
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. Type 2 drivers are usually faster
than Type 1 drivers. Like Type 1 drivers, Type 2 drivers require native
database client libraries to be installed and configured on the client
machine.
Advantages:
1). As there is no implementation of jdbc-odbc bridge, its considerably faster than a type 1 driver.
2). The distinctive characteristic
of type 2 jdbc drivers are that they are typically offer better
performance than the JDBC-ODBC Bridge as the layers of communication
(tiers) are less than that of Type1 and also it uses Native api which is
Database specific.
Disadvantages:
1). The vendor client library needs to be installed on the client machine.
2). Type 2 drivers cannot be used for the Internet.
3). If we change the Database we have to change the native api as it is specific to a database
4). This driver is platform dependent
5). Usually not thread safe.
6). This driver supports all java applications except Applets
7). Like Type 1 drivers, it’s not written in Java Language which forms a portability issue.
No comments:
Post a Comment