Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Type 2 Vs Type 4 JDBC DRIVER

 
Sudhanshu Mishra
Ranch Hand
Posts: 236
1
Eclipse IDE Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic