JDBC 4.0 API is mainly divided into two package
java.sql
javax.sql
This package include classes and interface to perform almost all JDBC operation such as creating and executing SQL Queries.
java.sql
packageclasses/interface | Description |
---|---|
java.sql.BLOB | Provide support for BLOB(Binary Large Object) SQL type. |
java.sql.Connection | creates a connection with specific database |
java.sql.CallableStatement | Execute stored procedures |
java.sql.CLOB | Provide support for CLOB(Character Large Object) SQL type. |
java.sql.Date | Provide support for Date SQL type. |
java.sql.Driver | create an instance of a driver with the DriverManager. |
java.sql.DriverManager | This class manages database drivers. |
java.sql.PreparedStatement | Used to create and execute parameterized query. |
java.sql.ResultSet | It is an interface that provide methods to access the result row-by-row. |
java.sql.Savepoint | Specify savepoint in transaction. |
java.sql.SQLException | Encapsulate all JDBC related exception. |
java.sql.Statement | This interface is used to execute SQL statements. |
This package is also known as JDBC extension API. It provides classes and interface to access server-side data.
javax.sql
packageclasses/interface | Description |
---|---|
javax.sql.ConnectionEvent | Provide information about occurence of event. |
javax.sql.ConnectionEventListener | Used to register event generated by PooledConnection object. |
javax.sql.DataSource | Represent the DataSource interface used in an application. |
javax.sql.PooledConnection | provide object to manage connection pools. |