Contents | Prev | Next JDBCTM Guide: Getting Started


Appendix A: Rejected Design Choices

A.1    Design Alternative: Create new subtypes of the existing java.sql types.

We have chosen to add new methods to existing JDBC interfaces and classes in order to add new functionality to the JDBC API.

An alternative design, which we considered, was instead to extend the existing java.sql types with new subtypes that contained any new methods. This approach was judged to be too unwieldy. For example, since we needed to add methods to the java.sql.Statement interface, such as Statement.setFetchSize(), it would have been necessary to create three new statement interfaces related to the old interfaces in a fairly complex inheritance hierarchy (see below). This approach seemed to add too much complexity to the JDBC API.






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