
Summary
In this chapter, you have been introduced to the JDBC API and the new features in JDBC 4.0 specification. The DriverManager
class is used to connect with a database. The Connection
interface represents a database connection. The Savepoint
interface represents a savepoint in a transaction. This is the point up to which the changes would be rolled back, if the transaction is rolled back. The Statement
interface is used to run static SQL statements. The ResultSet
interface represents the result set table generated by running SQL statements on a database. The PreparedStatement
represents a compiled SQL statement that can be run more than once with different parameters. The DatabaseMetadata
interface represents the database metadata, such as, table name, schema name, column name, and column type. The SQLException
class represents the database access error or other SQL errors. JDBC 4.0 specification provides some new features to facilitate the development of JDBC applications. Support for new SQL data types has been added. The new features include, automatic SQL Driver loading, SQL: 2003 XML Data Type support, support for wrapper pattern, enhancements in SQLException
, and enhanced connection management.