GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE
Go To First  |  Previous Question  |  Next Question 
 J2EE  |  Question 2 of 104    Print  
what are the differences between type1 driver, type2 driver,type3 driver,type4 driver in jdbc

  
Total Answers and Comments: 8 Last Update: September 02, 2007     Asked by: pavan kumar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 11, 2005 07:17:21   #1  
suresh        

RE: what are the differences between type1 driver, typ...

Type 1 driver:

This driver called as JDBC-ODBC bridge.The Java Statements converts to JDBC statements.JDBC statements calls ODBC by using JDBC-ODBC bridge. ODBC drivers convert into the requirements of databases.

Java--->JDBCStat-->JDBC-ODBC bridge-->ODBC-->Databases.

Type 2 driver: This driver is called as Native Driver where it requires the some native code to connect to the databases.

Type 3 Driver: This driver is called as Protocal driver where

Java-->JDBC statements-->SQLStatements--> databases.

Type 4 Driver: This driver directly converts the java statements to SQl Statements which require to databases. It wont convert to JDBC statement.


 
Is this answer useful? Yes | No
October 24, 2005 02:53:32   #2  
kadar shereef        

RE: what are the differences between type1 driver, typ...
what are the differences between type1 driver typ...
 
Is this answer useful? Yes | No
November 06, 2005 23:21:20   #3  
anil        

RE: what are the differences between type1 driver, typ...

can u clarify the basic differences in drivers


 
Is this answer useful? Yes | No
November 06, 2005 23:21:25   #4  
anil        

RE: what are the differences between type1 driver, typ...

can u clarify the basic differences in drivers


 
Is this answer useful? Yes | No
November 06, 2005 23:22:38   #5  
anil        

RE: what are the differences between type1 driver, typ...

can u clarify the basic differences in drivers


 
Is this answer useful? Yes | No
December 01, 2005 02:37:17   #6  
vibin        

RE: what are the differences between type1 driver, typ...

Type 1: JDBC-ODBC Bridge

The type 1 driver JDBC-ODBC Bridge translates all JDBC calls into ODBC (Open
DataBase Connectivity) calls and sends them to the ODBC driver. As such the
ODBC driver as well as in many cases the client database code must be
present on the client machine.


Type 2: Native-API/partly Java driver

JDBC driver type 2 -- the native-API/partly Java driver -- converts JDBC
calls into database-specific calls for databases such as SQL Server Informix
Oracle or Sybase. The type 2 driver communicates directly with the database
server; therefore it requires that some binary code be present on the client
machine.


Type 3: Net-protocol/all-Java driver

JDBC driver type 3 -- the net-protocol/all-Java driver -- follows a
three-tiered approach whereby the JDBC database requests are passed through the
network to the middle-tier server. The middle-tier server then translates the
request (directly or indirectly) to the database-specific native-connectivity
interface to further the request to the database server. If the middle-tier
server is written in Java it can use a type 1 or type 2 JDBC driver to do this.


Type 4 Pure Java Driver

Type 4 JDBC drivers are direct-to-database pure Java drivers ("thin"
drivers). A Type 4 driver takes JDBC calls and translates them into the network
protocol (proprietary protocol) used directly by the DBMS. Thus client machines
or application servers can make direct calls to the DBMS server. Each DBMS
requires its own Type 4 driver; therefore there are more drivers to manage in a
heterogeneous computing environment but this is outweighed by the fact that
Type 4 drivers provide faster performance and direct access to DBMS features.


Thanks

_vibin D


 
Is this answer useful? Yes | No
August 23, 2007 07:14:52   #7  
sreekanth        

RE: what are the differences between type1 driver, typ...
1.A JDBC-ODBC bridge provides JDBC API access via one or more ODBC drivers. Note that some ODBC native code and in many cases native database client code must be loaded on each client machine that uses this type of driver. Hence this kind of driver is generally most appropriate when automatic installation and downloading of a Java technology application is not important. For information on the JDBC-ODBC bridge driver provided by Sun see JDBC-ODBC Bridge Driver2.A native-API partly Java technology-enabled driver converts JDBC calls into calls on the client API for Oracle Sybase Informix DB2 or other DBMS. Note that like the bridge driver this style of driver requires that some binary code be loaded on each client machine. 3.A net-protocol fully Java technology-enabled driver translates JDBC API calls into a DBMS-independent net protocol which is then translated to a DBMS protocol by a server. This net server middleware is able to connect all of its Java technology-based clients to many different databases. The specific protocol used depends on the vendor. In general this is the most flexible JDBC API alternative. It is likely that all vendors of this solution will provide products suitable for Intranet use. In order for these products to also support Internet access they must handle the additional requirements for security access through firewalls etc. that the Web imposes. Several vendors are adding JDBC technology-based drivers to their existing database middleware products. A native-protocol fully Java technology-enabled driver converts JDBC technology calls into the network protocol used by DBMSs directly. This allows a direct call from the client machine to the DBMS server and is a practical solution for Intranet access. Since many of these protocols are proprietary the database vendors themselves will be the primary source for this style of driver.
 
Is this answer useful? Yes | No
September 01, 2007 11:33:50   #8  
Novice        

RE: what are the differences between type1 driver, typ...

Is the code for all the drivers same ?

Can someone give code sample of each type?


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape