| Author |
Type 2 Vs Type 4 JDBC DRIVER
|
Sudhanshu Mishra
Ranch Hand
Joined: May 28, 2011
Posts: 200
|
|
Hi all,
I have a question regarding jdbc drivers.
Why is it that Type 4 is good for internet applications as compared to type 2?The confusion is that in both the case we need to install something in the client machine: in the type 2 driver we install native db libraries in client machine,which makes it database specific,and in type 4 we use the driver corresponding to a database.So in both the cases,drivers are DBMS dependent.
So why is it that type 4 is better than type 2 for internet applications?
Thanks........
|
 |
Martin Vajsar
Bartender
Joined: Aug 22, 2010
Posts: 2328
|
|
Non-Java drivers are not only database specific, but also platform specific and furthermore, often require a configuration of their own (eg. standard Oracle database client - TNSNAMES.ORA etc.). Whereas Java-only drivers indeed are database specific, but once bundled into your project, do not require further driver installation or configuration.
So unless your application really needs something that only a native driver can provide (eg. some of the few functionalities supported by the type 2 driver only for Oracle), I'd say type 4 driver is always easier to use than type 2 driver, regardless of the character of the application. Though the DB vendor might provide some means to bundle the type 2 driver with the application (I think Oracle does have something like this), you still have the platform dependency, which is often a clear disadvantage and in any case one more thing to learn and maintain.
|
 |
 |
|
|
subject: Type 2 Vs Type 4 JDBC DRIVER
|
|
|