http://www.techmyguru.com/jdbc/index.php?section=11
  •  There are four distinct types of JDBC drivers:
    • Type1 - JDBC-ODBC Bridge Driver (Bridge)
    • Type2 - Native API Java Driver (Native)
    • Type3 - Java to Network Protocol Driver (Middleware)
    • Type4 - Pure Java Driver (Pure)
  • Type1 - JDBC-ODBC Bridge Driver
    • Bridges Java application and ODBC database connectivity
    • This driver is bundled with Java2 SDK(Software Develiopment Kit)
    • JDBC statements call the ODBC by using the JDBC - ODBC Bridge and finally the query is executed by the database.
    • May pose performance limitations due to an  overhead since the calls have to go through the JDBC to the ODBC driver.
    • It works only with Microsoft Operating Systems
  • Type 2 : Java Native Interface (JNI) Driver
    •  Converts JDBC calls into a database specific call for databases such as MySQL, or ORACLE etc.Oracle's OCI (Oracle Call Interface) client-side driver is an example of a Type 2 driver.
    • Communicates directly with the database server & requires some native code to connect to the database.
    • The vendor client library needs to be installed on the client machine. So it cannot be used in internet due the client side software needed
    • Native API must be installed in the Client System and hence type 2 drivers cannot be used for the Internet.. Like Type 1 drivers, itís not written in Java Language which may pose a portability issue.
  • Type 3
    • The client does not need any application
    • Server resolves connectivity: Usually a middleware server then communicates the client's requests to the data source.
    • written in Java and Portable
  • Type 4 :uses java networking libraries to communicate directly with the database server.
    • Most suitable for the web
    • JDBC drivers don't won't need  to translate database requests to ODBC or a native connectivity interface or to pass the request on to another server.
  • Drivers used in this series of documents:
    • PostgreSQL (v7.0 and later)
      jdbc:postgresql://:/org.postgresql.Driver
    • jdbc:mysql://:/org.gjt.mm.mysql.Driver
Next :: Establishing a Data Base Connection:: You can get a connection in two different ways, using the
DriverManager mechanism or using a DataSource object.
  • DriverManager :
  • DataSource :