JDBC Stands for Java Database Connectivity
JDBC is a API or Bridge that allows Java programs to exchange data with database systems.
JDBC allows user to send SQL, PL/SQL statements to almost any database and exchange data.
SQL language is prominently used for working with JDBC.
Java application calls the JDBC library. JDBC loads a driver which talks to the database.
JDBC classes & interfaces are contained within the java.sql package
For any further quires do write us to firstname.lastname@example.org
Before JDBC API database connectivity was tedious (not simple) and cumbersome.
Most of libraries provided for database connectivity were vendor specific and can operate with database provided by vendor or support was specific to databases only.If in case when user changes database or driver used the application then access portions has to changed accordingly.
Let us discuss Few types of drivers used
To connect with individual databases, JDBC requires drivers for each database and were provided by different vendors. The JDBC driver gives out the connection to the database and implements the protocol for transferring the query and result between client and database.
Currently We are using Type 4 driver for development of all enterprise projects and I advise all the developers or learners to use Type 4 driver.
Note : For Interview purpose go through about other drivers (Type 1,Type 2 & Type 3)
Type 1 driver converts all JDBC calls into ODBC calls and sends them to the ODBC driver.ODBC communicates with the database.
ODBC (Open Database Connectivity ) is a generic API.
The JDBC-ODBC Bridge driver is recommended only for experimental use or when no other alternative is available.
Type 2 drivers convert JDBC calls into database-specific calls i.e. this driver is specific to a particular database and it is provided by vendor.
For Example: Oracle will have oracle native API as provided by vendor.
Type 3 driver sends client requests to middle-tier server which contains Native Driver. The middle-tier then sends the request to the database.
The Type 4 uses java networking libraries to communicate directly with the database server. This driver is also called as Thin Driver.
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.
Current ye@r *
Leave this field empty
Upcoming Recruitment Drives
Recently Placed Candidates