Total members 10249 | Gratitudes |It is currently Thu May 17, 2012 8:41 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 3 posts ] 
Author Question
 Question subject: What are the types of jdbc drivers.?
PostPosted: Wed May 06, 2009 6:45 pm 
Offline
Newbie
User avatar

Joined: Wed May 06, 2009 6:26 pm
Posts: 3
Has thanked: 0 time
Have thanks: 0 time

I know the java first driver connection and the driver.sun.jdbc.odbc.JdbcOdbcDriver is the driver connection

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:oradsn","scott","tiger");

here oradsn is the DataSourseName of Oracle and the scott is the username of database "tiger" is the password of the database. i know this is all but pls expalin the types of 2nd,3rd drivers of jdbc.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: What are the types of jdbc drivers.?
PostPosted: Sat May 09, 2009 7:20 am 
Offline
Newbie
User avatar

Joined: Tue Apr 28, 2009 11:13 am
Posts: 10
Has thanked: 0 time
Have thanks: 0 time
Type 1

Type 1 drivers are "bridge" drivers. They use another technology such as Open Database Connectivity (ODBC) to communicate with a database. This is an advantage because ODBC drivers exist for many Relational Database Management System (RDBMS) platforms. The Java Native Interface (JNI) is used to call ODBC functions from the JDBC driver.

A Type 1 driver needs to have the bridge driver installed and configured before JDBC can be used with it. This can be a serious drawback for a production application. Type 1 drivers cannot be used in an applet since applets cannot load native code.
Type 2

Type 2 drivers use a native API to communicate with a database system. Java native methods are used to invoke the API functions that perform database operations. Type 2 drivers are generally faster than Type 1 drivers.

Type 2 drivers need native binary code installed and configured to work. A Type 2 driver also uses the JNI. You cannot use a Type 2 driver in an applet since applets cannot load native code. A Type 2 JDBC driver may require some Database Management System (DBMS) networking software to be installed.

The Developer Kit for Java JDBC driver is a Type 2 JDBC driver.
Type 3

These drivers use a networking protocol and middleware to communicate with a server. The server then translates the protocol to DBMS function calls specific to DBMS.

Type 3 JDBC drivers are the most flexible JDBC solution because they do not require any native binary code on the client. A Type 3 driver does not need any client installation.
Type 4

A Type 4 driver uses Java to implement a DBMS vendor networking protocol. Since the protocols are usually proprietary, DBMS vendors are generally the only companies providing a Type 4 JDBC driver.

Type 4 drivers are all Java drivers. This means that there is no client installation or configuration. However, a Type 4 driver may not be suitable for some applications if the underlying protocol does not handle issues such as security and network connectivity well.

____________________________

apartments in Austin
resume writing help


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: What are the types of jdbc drivers.?
PostPosted: Sat May 09, 2009 6:28 pm 
Offline
Newbie
User avatar

Joined: Wed May 06, 2009 6:26 pm
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
very very thanks...my friend.... :hi:


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 3 posts ] 
Quick reply


  

 Similar topics
 temperature transformer between different types
 show all drivers in file system
 good books of jsp and jdbc
 lesson9: XSD Complex Types Indicators
 need help in jdbc with mysql
 java data types
 JDBC
 Types of Pointers in C++
 Get Registered File Types and Their Associated Icons in C#
 Best Books for Servlet and JDBC

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team