Understanding JDBC Architecture and Components

JDBC (Java Database Connectivity) is a standard Java API used to connect Java applications with relational databases. It provides a common set of interfaces and classes for executing SQL queries and processing database results. JDBC architecture consists of components such as the JDBC API, DriverManager, JDBC Driver, Connection, Statement, ResultSet, and Database.

Architecture

Architecture-img

Explanation of Components

Component Explanation
Java Application The Java program that uses JDBC to perform database operations such as inserting, updating, deleting, and retrieving data.
JDBC API Provides standard interfaces and classes such as Connection, Statement, PreparedStatement, and ResultSet for database connectivity.
DriverManager Manages JDBC drivers and establishes a connection between the Java application and the database.
Connection Represents an active connection or session between the Java application and the database.
Statement Used to execute simple SQL statements against the database.
PreparedStatement Used to execute parameterized and precompiled SQL statements.
ResultSet Stores the data returned by a SELECT SQL query and allows the application to read the results.
DatabaseMetaData Provides information about the database, such as database name, tables, columns, and supported features.
JDBC Driver Database-specific software that converts JDBC calls from the Java application into commands understood by the particular database.
Database The actual relational database where data is stored, retrieved, updated, and deleted.
Scroll to Top