• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc drivers types and advantages

 
satish pune
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone ,
Having worked on type 1 drivers and then directly on type 4 driver I am not very sure about Type 2 and Type 3

I have read about the various types of drivers and have understood a few things but am confused about a few of them .

Here are a few doubts :

A >
At many places I have seen it mentioned that Type 3 Driver gives better performance than Typ1 or Type 2
My understanding of Type 3 is that the Middle Tier server communicates
with the database using inturn either Type 1 / 2 type of driver
If Type 1 / 2 is slow then in itself istnt type 3 slow when it is making use of Type 1 / 2 ?

B >
When we use a Type 2 Driver ( part Java Part Native ) does this mean that there is some code / dll that needs to be installed on the client ?
Is this why it is specified that type 2 drivers are platform dependent ?

C >
If Type 4 gives the best performance then in which case would it be beneficial to go for Type 3 Drivers ?

I have tried reading books and searcging the net but have not come up with an answer

Thanks in advance ,
-satish
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(Answers found using the JDBC API Tutorial and Reference, 3rd Ed. I like this book)

A >
At many places I have seen it mentioned that Type 3 Driver gives better performance than Typ1 or Type 2. My understanding of Type 3 is that the Middle Tier server communicates with the database using inturn either Type 1 / 2 type of driver. If Type 1 / 2 is slow then in itself istnt type 3 slow when it is making use of Type 1 / 2 ?

Yes, a Type-3 driver makes a request using a generic protocol to a mediator, and the mediator makes the specific request to the DBMS. This doesn't require Type 1 or 2 drivers, the mediator could make a native-protocol request directly to the DBMS just like a Type 4 driver.

B >
When we use a Type 2 Driver ( part Java Part Native ) does this mean that there is some code / dll that needs to be installed on the client? Is this why it is specified that type 2 drivers are platform dependent ?

Yes.

C >
If Type 4 gives the best performance then in which case would it be beneficial to go for Type 3 Drivers ?

The power of Type 3 gives better flexibility, but it may also be possible that a type 3 DRiver exists but not Type4, in which case you wouldn't have any choice...

Hope this helps, this isn't directly from the book and contains some of my opinion, but I hope it was still useful.

Dave.
 
satish pune
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks !
That was helpful

-satish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic