In this article, we will learn and understand different types of JDBC driver
JDBC Driver :
- JDBC Driver are a mean to interact with database from Java application
- In other words, JDBC driver are implementation of interfaces provided by JDBC API to interact with different databases on various platforms
JDBC Driver Types :
JDBC Drivers are categorized mainly into 4 types. These are
- Type 1 : JDBC-ODBC Bridge driver
- Type 2 : Native-API driver
- Type 3 : Network Protocol driver
- Type 4 : Network or Thin driver
Type | Driver | Translates |
1 | JDBC-ODBC bridge | JDBC calls into ODBC calls |
2 | Native API | JDBC calls into native database API calls |
3 | Network Protocol | Middleware translates JDBC calls into database specific calls |
4 | Thin (Network Driver) | JDBC calls directly into database calls |
Note: Out of 4 types of JDBC drivers, network/thin driver are most commonly used in today’s industries
Type 4 – Network or Thin driver :
- There is no requirement to install database client
- It takes only network information of database (server IP address, server port, database name) and connects directly to database from java application
- Below figure depicts skeleton of type-4 driver
Related Articles :
- Java – Introduction to JDBC
- Java – JDBC Driver types
- Java – Core JDBC components
- Java – JDBC Driver list for all leading database
- Java – JDBC connection steps
- Java – An example to connect MySQL database
- Java – An example to connect Oracle database
- Java – An example to connect MS Access database
- Java 8 – An example to connect MS Access database in Java 8
- Java – JDBC program to connect IBM DB2 database running on Mainframe z/OS system
- Java – Creating database using JDBC Statement interface
- Java – Droping database using JDBC Statement interface
- Java – Creating a table using JDBC Statement interface
- Java – Inserting a record using JDBC Statement interface
- Java – Getting all list of records using JDBC Statement interface
- Java – Getting single record using JDBC Statement interface
- Java – Updating a record using JDBC Statement interface
- Java – Deleting a record using JDBC Statement interface
- Java – Dropping a table using JDBC Statement interface
- Java – Batch update using JDBC Statement interface
- Java – Batch insert using JDBC Statement interface
- Java – Creating a table using JDBC PreparedStatement interface
- Java – Inserting a record using JDBC PreparedStatement interface
- Java – Getting all list of records using JDBC PreparedStatement interface
- Java – Getting single record using JDBC PreparedStatement interface
- Java – Updating a record using JDBC PreparedStatement interface
- Java – Deleting a record using JDBC PreparedStatement interface
- Java – Batch update using JDBC PreparedStatement interface
- Java – Batch insert using JDBC PreparedStatement interface
- Java – Calling Stored Procedure using JDBC CallableStatement interface
- Java – Calling Stored Function using JDBC CallableStatement interface
- Java – Calling Stored Procedure using JDBC CallableStatement interface with Batch execution
- Java – Transaction handling using JDBC Statement interface
- Java – Transaction handling using JDBC PreparedStatement interface
- Java – Integration with Spring framework (Spring JDBC)
- Java – Where clause example using JDBC Statement interface
- Java – Like clause example using JDBC Statement interface
- Java – Order by clause example using JDBC Statement interface
- Java – Metadata of database using JDBC DatabaseMetaData interface
- Java – Metadata of Resultset using JDBC ResultSetMetaData interface
- Java – Interview question and answer on JDBC
References :
- https://docs.oracle.com/javase/tutorial/jdbc/basics/gettingstarted.html
- https://docs.oracle.com/cd/E11882_01/java.112/e16548/overvw.htm#JJDBC28025
- http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html
- https://en.wikipedia.org/wiki/JDBC_driver
Happy Coding !!
Happy Learning !!