Provides the API for accessing and processing data stored in a data source (usually a relational database) using the JavaTM programming language. This API includes a framework whereby different drivers can be installed dynamically to access different data sources. Although the JDBCTM API is mainly geared to passing SQL statements to a database, it provides for reading and writing data from any data source with a tabular format. The reader/writer facility, available through the `javax.sql.RowSet` group of interfaces, can be customized to use and update data from a spread sheet, flat file, or any other tabular data source.

## What the JDBCTM for CDC/FP Optional Package includes

The JDBCTM CDC/FP Optional Package API includes a strict subset of the JDBC 3.0 API which provides the `java.sql` and the `javax.sql` packages. This complete API is include in the JavaTM 2 SDK Standard Edition (J2SETM), version 1.4. The `java.sql` package is referred to as the JDBC core API providing core application client database access. The `javax.sql` is referred to the JDBC Optional Package API and extends the functionality of the core `java.sql` package.

## Versions

The parent JDBC 3.0 API incorporates all of the previous JDBC API versions:

- The JDBC 2.1 core API
- The JDBC 2.0 Optional Package API
  (Note that the JDBC 2.1 core API and the JDBC 2.0 Optional Package API together are referred to as the JDBC 2.0 API.)
- The JDBC 1.2 API
- The JDBC 1.0 API

By strictly subsetting the established JDBC 3.0 API, which includes all previous JDBC API versions listed above, JDBC applications built using the JDBC CDC/FP API are upwardly portable to the full JDBC 3.0 API. A detailed list of the API differences (detailing classes, interfaces and methods) that have been removed a list is provided here

Classes, interfaces, methods, fields, constructors, and exceptions have the following "since" tags that indicate when they were introduced into the Java platform. When these "since" tags are used in JavadocTM comments for the JDBC API, they indicate the following:

- Since 1.4 -- new in the JDBC 3.0 API and part of the J2SE platform, version 1.4
- Since 1.2 -- new in the JDBC 2.0 API and part of the J2SE platform, version 1.2
- Since 1.1 or no "since" tag -- in the original JDBC 1.0 API and part of the JDKTM, version 1.1

NOTE: Many of the new features are optional; consequently, there is some variation in drivers and the features they support. Always check your driver's documentation to see whether it supports a feature before you try to use it.

## What the `java.sql` Package Contains

The `java.sql` package contains API for the following:

- Sending SQL statements to a database
  - `Statement` -- used to send basic SQL statements
  - `PreparedStatement` -- used to send prepared statements or basic SQL statements (derived from `Statement`)
  - `CallableStatement` -- used to call database stored procedures (derived from `PreparedStatement`)
  - `Connection` interface -- provides methods for creating statements and managing connections and their properties
  - `Savepoint` -- provides savepoints in a transaction
- Retrieving and updating the results of a query
  - `ResultSet` interface
- Standard mappings for SQL types to classes and interfaces in the Java programming language
  - `Blob` interface -- mapping for SQL `BLOB`
  - `Clob` interface -- mapping for SQL `CLOB`
  - `Date` class -- mapping for SQL `DATE`
  - `Time` class -- mapping for SQL `TIME`
  - `Timestamp` class -- mapping for SQL `TIMESTAMP`
  - `Types` class -- provides constants for SQL types
- Metadata
  - `DatabaseMetaData` interface -- provides information about the database
  - `ResultSetMetaData` interface -- provides information about the columns of a `ResultSet` object
- Savepoints
  - `Savepoint` -- allows a point within a current transaction from the `Connection.rollback` method
- Exceptions
  - `SQLException` -- thrown by most methods when there is a problem accessing data and by some methods for other reasons
  - `SQLWarning` -- thrown to indicate a warning
  - `DataTruncation` -- thrown to indicate that data may have been truncated
  - `BatchUpdateException` -- thrown to indicate that not all commands in a batch update executed successfully

## Package Specification

- Specification of the JDBC 3.0 API

## Related Documentation

- Chapters on the JDBC API--from the online version of The Java Tutorial Continued

- JDBCTMAPI Tutorial and Reference, Second Edition: Universal Data Access for the Java 2 Platform-- a complete reference and tutorial for the JDBC 2.0 API

@since 1.1