JDBC Drivers
Type1 Driver: jdbc-odbc bridge Driver:
ARCHITECTURE:
CLIENT SERVER
| |
Type1 driver translates jdbc call or request to Microsoft ODBC call or request (Open Database Connectivity). The converted ODBC request will interact with vendor specific client side database library.
The client side database library makes a call to database server which is the native Call or native request.
| |
Note:
|
Type2 Driver: partial native partial java Driver
ARCHITECTURE
CLIENT SERVER
Fig. Type2 Driver Architecture
When you make a jdbc call, jdbc call will be converted to native call with the help of client side database library
Notes:
Name : partial native partial java Driver
Vendor : DB Vendor
Path : d:\oracle\ora90\bin;
Classpath : d:\oracle\ora90\jdbc\lib\classes111.jar
Classname : oracle.jdbc.driver.OracleDriver
Url : jdbc:oracle:oci8: @hostname:portnumber:SID
Example : jdbc:oracle:oci8: @hostname: 1521:SID
Advantages:
1. Performance of this driver is better than Type1.
2. It is compatible in all Operating System.
Disadvantages:
1. In this we have to install some of database library in client machine. Because of this maintenance will be increased.
2. It is not suitable for Internet applications.
Type3 Driver: Net protocol driver
ARCHITECTURE
CLIENT Middleware ServerDB Server
Fig. Type 3 Driver Architecture
When you make a jdbc call that will interact with the middleware server where the database library is available and this call will be converted to your native call using that library.
Notes:
Name : Net protocol driver
Vendor : intersolv
Software : install IDS Server
Path : d:\idsserver\idss.exe;
Classpath : d:\idsserver\idsdriver.jar
Classname : ids.driver.IdsDriver
Url : jdbc:ids://hostname//12/conn
Example : jdbc:oracle:oci8: @hostname: 1521:SID
Advantages:
1.No need to install DB Library
2.It is suitable for Internet applications.
Disadvantages:
1.Using this Type3 we donot have to chance to interact with DBServer directly. We have to go through the middleware server. This increases request and response time.
2. Performance is little bit poor than Type1 and Type2.
Notes:
Name : Net protocol driver
Vendor : intersolv
Software : install IDS Server
Path : d:\idsserver\idss.exe;
Classpath : d:\idsserver\idsdriver.jar
Classname : ids.driver.IdsDriver
Url : jdbc:ids://hostname//12/conn
Example : jdbc:oracle:oci8: @hostname: 1521:SID
Advantages:
1.No need to install DB Library
2.It is suitable for Internet applications.
Disadvantages:
1.Using this Type3 we donot have to chance to interact with DBServer directly. We have to go through the middleware server. This increases request and response time.
2. Performance is little bit poor than Type1 and Type2.
Type4 Driver: pure java driver
ARCHITECTURE
CLIENT SERVER
Fig. Type 4 Driver Architecture
When you want a jdbc call that will be converted to a native call directly.
Notes:
Name : pure java driver
Vendor : DB Vendor
Software : any oracle software
Path : d:\oracle\ora90\bin;
Classpath : d:\oracle\ora90\jdbc\lib\classes111.jar(Set classpath only on server systems)
Classname : oracle.jdbc.driver.OracleDriver
Url : jdbc:oracle:thin:@hostname:portnumber:SID
Example : jdbc:oracle:thin:@hostname: 1521:SID
Advantages:
1.No need to install DB Library in client machine.
2.It is suitable for Internet applications.
3.Performance of this driver is best among four JDBC Drivers.
Disadvantages:
1.Elapsed time (request time+processing time+response time) is little bit higher than Type2.
Comparison between Type2 and Type4:
1. Performance wise Type 4 is best whereas Speed wise Type2 is best.
2. Type2 is not good for stored procedures but good for prepared statements. Whereas Type4 is good for all.
3. Type2 is not portable on all Operating Systems whereas Type4 is portable.
4. Type2 is not good for internet applications whereas Type4 is good.
5. Type2 is not supported by all databases whereas Type4 supports all.
No comments:
Post a Comment