The Java Database Connectivity (JDBC) API provides universal data access from the Java programming language. Using the JDBC API, you can access virtually any data source, from relational databases to spreadsheets and flat files. JDBC technology also provides a common base on which tools and alternate interfaces can be built.
The JDBC API is comprised of two packages:
You automatically get both packages when you download the Java Platform Standard Edition (Java SE) 7.
To use the JDBC API with a particular database management system, you need a JDBC technology-based driver to mediate between JDBC technology and the database. Depending on various factors, a driver might be written purely in the Java programming language or in a mixture of the Java programming language and Java Native Interface (JNI) native methods. To obtain a JDBC driver for a particular database management system, see JDBC Data Access API.
JDBC 4.1 introduces the following features:
try
-with-resources statement to automatically close resources of type Connection
, ResultSet
, and Statement
RowSetFactory
interface and the RowSetProvider
class, which enable you to create all types of row sets supported by your JDBC driver.