Java – JDBC Driver types

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
1JDBC-ODBC bridgeJDBC calls into ODBC calls
2Native APIJDBC calls into native database API calls
3Network ProtocolMiddleware translates JDBC calls into database specific calls
4Thin (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
2-Java-JDBC-Type-4-Network-Thin-driver

Related Articles :

References :

Happy Coding !!
Happy Learning !!

Java – JDBC Driver list for all leading database
Java – Introduction to JDBC