Spec-Zone .ru
спецификации, руководства, описания, API
Contents | Prev | Next JDBCTM Guide: Getting Started


4 What's Actually Changed

This chapter describes the practical differences between the JDBC 1.0 and JDBC 2.0 APIs.

4.1     A New Package

The JDBC API has been factored into two complementary components. The first component is API that is core to the Java platform (the core JDBC 2.1 API ) and comprises the updated contents of the java.sql package. This document contains the specification for the core JDBC 2.1 API. The second component, termed the JDBC 2.0 Optional Package API, comprises the contents of a new package, javax.sql, which as its name implies will be delivered as an optional package to the Java platform (formerly Java Standard Extension). The JDBC 2.0 Optional Package API is described in a separate document.

The java.sql package contains all of the additions that have been made to the existing interfaces and classes, in addition to a few new classes and interfaces. The new javax.sql package has been introduced to contain the parts of the JDBC API which are closely related to other pieces of the Java platform that are themselves Optional Packages , such as the Java Naming and Directory Interface (JNDI), and the Java Transaction Service (JTS). In addition, some advanced features that are easily separable from the core JDBC API, such as connection pooling and rowsets, have also been added to javax.sql . Putting these advanced facilities into an optional package instead of into core will help keep the core JDBC API small and focused.

Since optional packages are downloadable, it will always be possible to deploy an application which uses the features in the JDBC Optional Package that will "run anywhere ," since if an optional package isn't installed on a client machine, it can be downloaded along with the application that uses it.

4.2     Changes to Classes and Interfaces

The list below contains all of the JDBC 2.1 API core classes and interfaces. Interfaces and classes that are new are listed in bold type. All of the interfaces and classes present in the JDBC 1.0 API are also present in the core JDBC 2.1 API, however, some of the JDBC 1.0 technology interfaces have gained additional methods. The interfaces that contain new methods are listed in italics and those that have not changed are in normal type.

java.sql.Array

java.sql.BatchUpdateException

java.sql.Blob

java.sql.CallableStatement

java.sql.Clob

java.sql.Connection

java.sql.DatabaseMetaData

java.sql.DataTruncation

java.sql.Date

java.sql.Driver

java.sql.DriverManager

java.sql.DriverPropertyInfo

java.sql.PreparedStatement

java.sql.Ref

java.sql.ResultSet

java.sql.ResultSetMetaData

java.sql.SQLData

java.sql.SQLException

java.sql.SQLInput

java.sql.SQLOutput

java.sql.SQLWarning

java.sql.Statement

java.sql.Struct

java.sql.Time

java.sql.Timestamp

java.sql.Types

The separate core JDBC 2.1 API documentation contains the Java programming language definitions of the java.sql interfaces and classes listed above. The figure below shows the more important core interfaces and their relationships. The important relationships between interfaces have not changed with the introduction of the new JDBC API.




The list below contains the classes and interfaces that comprise the javax.sql package. A detailed specification of these new types is contained in a separate document.

javax.sql.ConnectionEvent

javax.sql.ConnectionEventListener

javax.sql.ConnectionPoolDataSurce

javax.sql.DataSource

javax.sql.PooledConnection

javax.sql.RowSet

javax.sql.RowSetEvent

javax.sql.RowSetInternal

javax.sql.RowSetListenerl

javax.sql.RowSetMetaData

javax.sql.RowSetReader

javax.sql.RowSetWriter

javax.sql.XAConnection

javax.sql.XADataSource



Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996-1999 Sun Microsystems, Inc. All rights reserved.