• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC driver types

 
anagha patankar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
I have googled around for the different types of drivers ( 1 ... 4 )

While reading a number of articles I was not quite sure of the following :

1 >
Type 2 Drivers need vendor database library to be loaded on each client machine

I am not sure what this means - client here would probably mean the appserver or servlet engine ( Tomcat / weblogic / websphere ) etc

So I dont see or understand the problem
If I were to use a Type 4 driver - I would still need to set it in the classpath

So again - is the above disadvantage for type 2 driver really a disadvantage ?
( I am not talking about performance here )

2 >
Not quite sure where a Type 3 driver fits in the real world
Are there any real world scenarios where such a driver is used ?
( Pardonez my ignorance )

3 >
Not sure why I would use a Type 2 driver as compared to a type 4 driver
when type 4 would give better performance as compared to type 2

Thanks in advance ,
-anagha
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34851
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anagha,
1) "Native" refers to binary. For type 3 and 4 drivers you can distribute a jar with .class files that can be run on any OS that supports Java. For type 1 and 2 drivers, you must get actual executable code for the OS you are using.

2) When type 4 drivers were introduced, not all vendors provided them. So people used type 3 instead. If you have both type 3 and 4 available, there isn't a scenario that I can think of to use type 2.

3) Type 2 drivers can be optimized for a specific OS/platform. This makes them faster. In practice, the database call itself takes even longer and the time difference doesn't have a noticeable effect on the system.
 
anagha patankar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne for your inputs

Regards ,
-anagha
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic