JDBC (Java Database Connectivity) is a Java API that manages database connection, query and command issuance, and processing of database result sets. Released as part of JDK 1.1 in 1997, JDBC was one of the earliest libraries developed for the Java language.

JDBC was originally designed as a client-side API that allows a Java client to interact with a data source. This has changed with JDBC 2.0, which includes an additional package that supports JDBC connections on the server side. Each new version of JDBC has since included updates to the package from the client (java.sql) and the server-side packagejavax.sql). JDBC 4.3, the latest version at the time of writing, was released as part of Java SE 9 in September 2017. JSR 221.

This article provides an overview of JDBC and JDBC drivers, followed by a practical introduction to using JDBC to connect a Java client to a lightweight relational database.

How JDBC works

As a developer, you can use JDBC to interact with a database from a Java program. JDBC acts as a bridge from your code to the database, as shown in Figure 1.

JDBC connects Java programs to databases.IDG

Figure 1. JDBC connects Java programs to databases.

JDBC vs. ODBC

Previously, JDBC developers used Open Database Connectivity (ODBC), a language-independent standard approach to accessing a relational database management system or RDBMS. In a sense, JDBC is inspired by ODBC. The difference is that JDBC is specific to Java, offering a programming-level interface that handles the mechanics of Java applications communicating with a database.

JDBC architecture

The JDBC interface consists of two layers:

https://www.infoworld.com/article/3388036/what-is-jdbc-introduction-to-java-database-connectivity.html#tk.rss_all

Previous articleWatch the impressive video for the release of the schedule of this NFL team inspired by anime
Next articleThe White House can invoke the Defense Proceedings Act to increase supplies