# JDBC Reference

Derby comes with a built-in JDBC driver.

That makes the JDBC API the only API for working with Derby databases. The driver is a native protocol all-Java driver (type number four of types defined by Sun).

This section provides reference information about Derby's implementation of the JDBC API and documents the way it conforms to the JDBC 2.0, 3.0, and 4.0 APIs.

See the Derby Developer's Guide for task-oriented instructions on working with the driver.

Note that an application run on Java SE 6 uses the JDBC4 versions of Derby's JDBC drivers. In that environment, Derby's two JDBC drivers, the embedded driver and the network client driver, implement an early access (late beta) version of the JDBC4 specification. It is possible that the final version of the JDBC4 specification may differ from the early access version available when this manual was written. We expect such discrepancies to be minor. These discrepancies, if any, are documented in the 10.2 Release Notes.

This JDBC driver implements the standard JDBC interface defined by Sun. When invoked from an application running in the same JVM as Derby, the JDBC driver supports connections to a Derby database in embedded mode. No network transport is required to access the database. In client/server mode, the client application dispatches JDBC requests to the JDBC server over a network; the server, in turn, which runs in the same JVM as Derby, sends requests to Derby through the embedded JDBC driver.

The Derby JDBC implementation provides access to Derby databases and supplies all the required JDBC interfaces. Unimplemented aspects of the JDBC driver return an SQLException with a message stating "Feature not implemented" and an SQLState of XJZZZ. These unimplemented parts are for features not supported by Derby.

- Core JDBC java.sql Classes, Interfaces, and Methods
- java.sql.Driver
- java.sql.DriverManager.getConnection
- java.sql.Driver.getPropertyInfo
- java.sql.Connection
- java.sql.DatabaseMetaData
- java.sql.Statement
- java.sql.CallableStatement
- java.sql.SQLException
- java.sql.PreparedStatement
- java.sql.ResultSet
- java.sql.ResultSetMetaData
- java.sql.SQLWarning
- java.sql.SQLXML
- Mapping of java.sql.Types to SQL types
  In Derby, the java.sql.Types are mapped to SQL data types
- java.sql.Blob and java.sql.Clob
- java.sql.Connection
- java.sql.ResultSet
- java.sql.Statement
- java.sql.PreparedStatement
- java.sql.CallableStatement
- java.sql.DatabaseMetaData
- java.sql.ResultSetMetaData
- java.sql.BatchUpdateException
- JDBC Package for Connected Device Configuration/Foundation Profile (JSR169)
- JDBC 3.0-only features
- JDBC 4.0-only features
- JDBC escape syntax