Friday 24 August 2012

Type 4 Driver


Type 4: Native-protocol driver (Pure)


In a Type 4 driver, a pure Java-based driver that communicates directly with vendor's database through socket connection.This kind of driver is extremely flexible, you don't need to install special software on the client or server. Further, these drivers can be downloaded dynamically.
Type 4 drivers are thus platform independent. They install inside the Java Virtual Machine of the client. This provides better performance than the type 1 and type 2 drivers as it does not have the overhead of conversion of calls into ODBC or database API calls. Unlike the type 3 drivers, it does not need associated software to work.
 

Advantages:

1). The major benefit of using a type 4 jdbc drivers are that they are completely written in Java to achieve platform independence and eliminate deployment administration issues. It is most suitable for the web.
2). These drivers don't translate the requests into an intermediary format (such as ODBC).Performance is typically quite good.
3). The client application connects directly to the database server. No translation or middleware layers are used, improving performance.
4). You don’t need to install special software on the client or server. Further, these drivers can be downloaded dynamically.
 

Disadvantages:

1). Drivers are database dependent, as different database vendors use wildly different (and usually proprietary) network protocols.
2). It requires another server application to install and maintain. Traversing the recordset may take longer, since the data comes through the backend server.
 

Which is suitable driver for use?

1). The type 1 driver is not considered a deployment-level driver and is typically used for development and testing purposes only.
2). If your Java application is accessing multiple types of databases at the same time, type 3 is the preferred driver.
1). If you are accessing one type of database, such as Oracle, Sybase, or IBM, the preferred driver type is 4.
2). Type 2 drivers are useful in situations where a type 3 or type 4 driver is not available yet for your database.

No comments:

Post a Comment