Member-only story

What Is JDBC?

Bijen Adhikari
7 min readSep 27, 2023

To connect java application with Database we require JDBC.

Java Database Connectivity, commonly referred to as JDBC, is a fundamental technology for Java developers when it comes to interacting with relational databases. It provides a standardized way to connect, query, and manipulate databases, making it an essential part of many Java applications, from web applications to enterprise software. In this article, we will explore JDBC, its architecture, and how to use it effectively in your Java projects.

Understanding JDBC

JDBC is a Java-based API (Application Programming Interface) that allows Java applications to interact with relational databases. It provides a set of classes and methods for database operations, including connecting to databases, executing SQL queries, and processing result sets. With JDBC, you can work with various relational database management systems (RDBMS), such as MySQL, Oracle, PostgreSQL, and SQL Server, without having to learn the intricacies of each database system.

Key Components of JDBC

  1. JDBC Drivers:

→ JDBC drivers are platform-specific implementations that enable Java applications to communicate with a particular database system. There are four types of JDBC drivers:

  • Type-1: JDBC-ODBC bridge driver (legacy).
  • Type-2: Native-API driver (partially Java-based).
  • Type-3: Network Protocol driver (middleware-based).

--

--

Bijen Adhikari
Bijen Adhikari

Written by Bijen Adhikari

Hi, I am Bijen from Nepal I write about Electronics, Electrical, Programming, Fitness. Also, I am a certified SSI Master Trainer.

No responses yet