Unknown

SQL Package

JDBC 4.0 API

JDBC 4.0 API is mainly divided into two package
  1. java.sql
  2. javax.sql

java.sql package

This package include classes and interface to perform almost all JDBC operation such as creating and executing SQL Queries.

Important classes and interface of java.sql package

classes/interfaceDescription
java.sql.BLOBProvide support for BLOB(Binary Large Object) SQL type.
java.sql.Connectioncreates a connection with specific database
java.sql.CallableStatementExecute stored procedures
java.sql.CLOBProvide support for CLOB(Character Large Object) SQL type.
java.sql.DateProvide support for Date SQL type.
java.sql.Drivercreate an instance of a driver with the DriverManager.
java.sql.DriverManagerThis class manages database drivers.
java.sql.PreparedStatementUsed to create and execute parameterized query.
java.sql.ResultSetIt is an interface that provide methods to access the result row-by-row.
java.sql.SavepointSpecify savepoint in transaction.
java.sql.SQLExceptionEncapsulate all JDBC related exception.
java.sql.StatementThis interface is used to execute SQL statements.

javax.sql package

This package is also known as JDBC extension API. It provides classes and interface to access server-side data.

Important classes and interface of javax.sql package

classes/interfaceDescription
javax.sql.ConnectionEventProvide information about occurence of event.
javax.sql.ConnectionEventListenerUsed to register event generated by PooledConnection object.
javax.sql.DataSourceRepresent the DataSource interface used in an application.
javax.sql.PooledConnectionprovide object to manage connection pools.