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 2.0 API has been factored into two complimentary components. The first component, which is termed the JDBC 2.0 Core API in this document, comprises the updated contents of the java.sql package. This document contains the specification for the JDBC 2.0 Core API. The second component, termed the JDBC 2.0 Standard Extension API, comprises the contents of a new package, javax.sql, which as its name implies will be delivered as a Java Standard Extension. The JDBC 2.0 Standard Extension API is described in a separate document.

The java.sql package contains all of the additions that have been made to the existing JDBC 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 2.0 API which are closely related to other pieces of the Java platform that are themselves standard extensions, 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 JDBC Core API, such as connection pooling and rowsets, have also been added to javax.sql. Putting these advanced facilities into a standard extension instead of into core will help keep the JDBC Core API small and focused.

Since standard extensions are downloadable, it will always be possible to deploy an application which uses the features in the JDBC standard extension that will "run anywhere", since if a standard extension 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.0 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 JDBC 2.0 Core API, however, some of the JDBC 1.0 interfaces have gained additional methods. The JDBC 1.0 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 JDBC 2.0 Core API documentation contains the Java 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 JDBC 2.0 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.CursorMovedEvent

javax.sql.CursorMovedListener

javax.sql.DataSource

javax.sql.PooledConnection

javax.sql.RowSet

javax.sql.RowSetImpl

javax.sql.RowSetMetaData

javax.sql.RowSetMetaDataImpl

javax.sql.RowSetUpdatedEvent

javax.sql.RowSetUpdatedListener

javax.sql.XAConnection

javax.sql.XADataSource



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