JDBC stands for Java Database Connectivity. JDBC is a Java API to connect and execute the query with the database, and processing the results. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC drivers to connect with the database. There are four types of JDBC drivers:
We have discussed the above four drivers in the next chapter.
We can use JDBC API to access tabular data stored in any relational database. By the help of JDBC API, we can save, update, delete and fetch data from the database. It is like Open Database Connectivity (ODBC) provided by Microsoft.

The current version of JDBC is 4.3. It is the stable release since 21st September, 2017. It is based on the X/Open SQL Call Level Interface. The java.sql package contains classes and interfaces for JDBC API. A list of popular interfaces of JDBC API are given below:
A list of popular classes of JDBC API are given below:
Before JDBC, ODBC API was the database API to connect and execute the query with the database. But ODBC API uses ODBC driver that is written in C language (i.e. platform dependent and unsecured). That is why Java has defined its own API (JDBC API) that uses JDBC drivers (written in Java language).
We can use JDBC API to handle database using Java program and can perform the following activities:
JDBC also provides support for handling database metadata that allows us to retrieve information about the database, such as its tables, columns, and indexes. We can use the DatabaseMetaData interface to obtain this information that can be useful for dynamically generating SQL queries or for database schema introspection.
Another important feature of JDBC is its support for batch processing that allows us to group multiple SQL statements into a batch and execute them together. It can improve performance by reducing the number of round trips between the application and the database.
In this JDBC tutorial, we will learn four types of JDBC drivers, their advantages and disadvantages.
In this JDBC tutorial, we will see the five steps to connect to the database in Java using JDBC.
In this JDBC tutorial, we will connect a simple Java program with the Oracle database.
In this JDBC tutorial, we will connect a simple Java program with the MySQL database.
Let's connect java application with access database with and without DSN.
In this JDBC tutorial, we will learn what does the DriverManager class and what are its methods.
In this JDBC tutorial, we will learn what is Connection interface and what are its methods.
In this JDBC tutorial, we will learn what is Statement interface and what are its methods.
In this JDBC tutorial, we will learn what is ResultSet interface and what are its methods. Moreover, we will learn how we can make the ResultSet scrollable.
In this JDBC tutorial, we will learn what is benefit of PreparedStatement over Statement interface. We will see examples to insert, update or delete records using the PreparedStatement interface.
In this JDBC tutorial, we will learn how we can get the metadata of a table.
In this JDBC tutorial, we will learn how we can get the metadata of a database.
Let's learn how to store image in the Oracle database using JDBC.
Let's see the simple example to retrieve image from the Oracle database using JDBC.
Let's see the simple example to store file in the Oracle database using JDBC.
Let's see the simple example to retrieve file from the Oracle database using JDBC.
Let's see the code to call stored procedures and functions using CallableStatement.
Let's see the simple example to use transaction management using JDBC.
Let's see the code to execute batch of queries.
Let's see the working of new JDBC RowSet interface.
We request you to subscribe our newsletter for upcoming updates.