Monday, November 12, 2007

Classes and Interfaces in JAVA-JDBC

The following classes and interfaces make up the JDBC API.

The java.sql Package

The core JDBC API is contained in the package java.sql. The classes and interfaces
in java.sql are listed below. Classes are bold type; interfaces are in standard type.

  • java.sql.Array
  • java.sql.BatchUpdateException
  • java.sql.Blob
  • java.sql.CallableStatement
  • java.sql.Clob
  • java.sql.Connection
  • java.sql.DataTruncation
  • java.sql.DatabaseMetaData
  • java.sql.Date
  • java.sql.Driver
  • java.sql.DriverManager
  • java.sql.DriverPropertyInfo
  • java.sql.ParameterMetaData
  • java.sql.PreparedStatement
  • java.sql.Ref
  • java.sql.ResultSet
  • java.sql.ResultSetMetaData
  • Chapter 5 Classes and Interfaces 30
  • java.sql.Savepoint
  • java.sql.SQLData
  • java.sql.SQLException
  • java.sql.SQLInput
  • java.sql.SQLOutput
  • java.sql.SQLPermission
  • java.sql.SQLWarning
  • java.sql.Statement
  • java.sql.Struct
  • java.sql.Time
  • java.sql.Timestamp
  • java.sql.Types
The following classes and interfaces are either new or updated in the JDBC 3.0 API.
New classes and interfaces are highlighted in bold.

  • java.sql.Array
  • java.sql.Blob
  • java.sql.CallableStatement
  • java.sql.Clob
  • java.sql.Connection
  • java.sql.DatabaseMetaData
  • java.sql.ParameterMetaData
  • java.sql.PreparedStatement
  • java.sql.Ref
  • Java.sql.ResultSet
  • java.sql.Savepoint
  • java.sql.SQLInput
  • java.sqlOutput
  • java.sql.Statement
  • java.sql.Types
Relationships between major classes and interface in the java.sql package

  • Connection
  • Statement
  • Data types
  • CallableStatement
  • ResultSet
  • PreparedStatement
  • subclasses
  • prepareStatement
  • prepareCall
  • createStatement
  • executeQuery
  • executeQuery
  • executeQuery
  • Input to
  • getXXX
  • Input/Output of
  • getMoreResults / getResultSet
  • subclasses
  • PreparedStatement
  • CallableStatement

The javax.sql Package

The following list contains the classes and interfaces that are contained in the
javax.sql package. Classes are highlighted in bold; interfaces are in normal type.

  • javax.sql.ConnectionEvent
  • javax.sql.ConnectionEventListener
  • javax.sql.ConnectionPoolDataSource
  • javax.sql.DataSource
  • javax.sql.PooledConnection
  • javax.sql.RowSet
  • javax.sql.RowSetEvent
  • javax.sql.RowSetInternal
  • javax.sql.RowSetListener
  • javax.sql.RowSetMetaData
  • javax.sql.RowSetReader
  • javax.sql.RowSetWriter
  • javax.sql.XAConnection
  • javax.sql.XADataSource
Note – The classes and interfaces in the javax.sql package were first made available as the JDBC 2.0 Optional Package. This optional package was previously separate from the java.sql package, which was part of J2SE 1.2. Both packages (java.sql and javax.sql) are now part of J2SE 1.4.

classes and interfaces in these areas of functionality: DataSource objects, connection pooling, distributed transactions, and rowsets.


Relationship between javax.sql.DataSource and java.sql.Connection
Relationships involved in connection pooling DataSource Connection

  • java.sql javax.sql
  • getConnection
  • Connection PooledConnection
  • javax.sql java.sql
  • getConnection
  • ConnectionPoolDataSource
  • getConnection
  • ConnectionEvent
  • ConnectionEventListener
  • close or error event

Relationships involved in distributed transaction support

XAConnection
PooledConnection
ConnectionEvent
XAResource
ConnectionEventListener
XADataSource
Connection
java.sql javax.sql javax.transaction.xa
getConnection
getXAConnection
getXAResource
subclasses
close or error event

No comments: