JDBC concepts

Before performing any operations in JDBC, we need to establish a connection to the database. Here are some of the important classes/interfaces in JDBC for executing SQL statements:

JDBC class/interface

Description

java.sql.Connection

Represents the connection between the application and the backend database. Must for performing any action on the database.

java.sql.DriverManager

Manages JDBC drivers used in the application. Call the DriverManager.getConnection static method to obtain the connection.

java.sql.Statement

Used for executing static SQL statements.

java.sql.PreparedStatement

Used for preparing parameterized SQL statements. SQL statements are pre-compiled and can be executed repeatedly ...

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.