Tuesday 10 September 2013

Types of JDBC Connection In Java

JDBC Connection is a connection pool in order to interact with the database whether simple or distributed database.
There are 5 types of Jdbc Driver:

1.JDBC-ODBC Driver:
Java Database Connectivity -Oracle Database Connectivity is a type 1 driver used in earlier times and now we use just used it  for testing purposes.
Simple architecture where we have: Java Application calling>>JDBC API>>JDBC Driver Manager>>JDBC ODBC Bridge>>ODBC Driver>> Database Library API>>Database.
Overhead due to ODBC connection and ODBC need to be on client machine or need to install it.

2.Type 2 Driver- Native API Driver:
These Driver converts jdbc calls into native calls of the database apis.It is a database driven implementation that uses client side libraries of the database.
Simple Architecture Where we have:Java Application Calling>>JDBC API>>JDBC Driver Manager>>Native API Driver>>Database Library API>>Database.
IT is faster than Type 1 as there is no requirement for ODBC connection.
It is platform independent and support all application excepts applet.

 3.Type 3 Driver Network Protocol Driver:
These driver is also known as pure java Driver for Database Middleware is a database driven implementation which makes use of middle tier between calling program and database.
The JDBC client driver written in java communicate with the net server using a database independent protocol then net server translates this into database command for fetching or update operation on database
Simple Architecture:
Java application call>>Java API>>JDBC Driver Manager>>Network Protocol Driver>>Middle ware>>Distributed Database.

4.Type 4 Driver Pure Java Driver:
Most importantly used by all the organization as it is a pure Java Driver that converts java calls into data specific calls and get required results with no pain and ease of use while connecting.
These Driver is Database Depentdent only drawback .
Simple Architecture:
Java application call>>Java API>>JDBC Driver Manager>>Network Protocol Driver>>Distributed Database.

5.Type 5 Driver :
 IT is a new driver which eradicate the limitations of type 4 and hence 100% client side single tier .
It eliminates unrestricted performance,codeless enhancement,all in one deployment,resource efficiency.




No comments:

Post a Comment