This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Type II and Type IV driver

 
Raj Jindal
Ranch Hand
Posts: 50
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody explain me the difference between type 2 and type 4 jdbc driver. It is said that Type 4 driver directly specks to Database. it resides on server. Then wat resides on the client in case of type 4 that helps it to communicate with the DB.
i am looking for a details convincing answer
 
vikasids sharma
Ranch Hand
Posts: 157
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by raj jindal:
Can anybody explain me the difference between type 2 and type 4 jdbc driver.

Type 2 drivers act as wrapper across client code(native code libraries).basically the call is first delegeted to native code libraries which further interacts with database.
Type 4 drivers are not wrappers rather pure java drivers,call is directly made to destined database.
It is said that Type 4 driver directly specks to Database. it resides on server. Then wat resides on the client in case of type 4 that helps it to communicate with the DB.

The key point in using Type 4 driver is you just make type 4 driver classes available to calling code(through class path or other means)to let your code interact with database.
 
Raj Jindal
Ranch Hand
Posts: 50
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anybody explain me in more detail the difference between type 2 and type 4 jdbc drivers
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vikasids sharma's explanation was quite good. Type II drivers use native (i.e., non-Java code), whereas type IV drivers are 100% Java. There are very few type II drivers anymore, but they were very common when JDBC first came out.
 
Sainudheen Mydeen
Ranch Hand
Posts: 218
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raj
Will this help you?

---------------
Sainudheen
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
But given the fact that the DB (RDBMS) is not implemented in Java, Type IV also uses native code so or so... only the level of abstraction is one level lower.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

But given the fact that the DB (RDBMS) is not implemented in Java, Type IV also uses native code so or so... only the level of abstraction is one level lower.

If by "native code" we mean only JNI code, then no, this isn't right; most type 4 drivers have no native code; they talk to the database using a database's own network interface.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Type 4 drivers are pure java drivers with no native code but they proprietary protocol.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
www.javaworld.com/javaworld/jw-07-2000/ jw-0707-jdbc.html
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic