JDBC API Tutorial and Reference Be the First to Write a Review and tell the world about this title!People who purchase this book frequently purchase: - Database Programming with JDBC & Java, 2nd Edition; George Reese, $29.95, 40% Off!
- Head First Design Patterns; Eric Freeman, et al, $26.95, 40% Off!
- Core J2EE Patterns: Best Practices and Design Strategies, 2nd Edition; Deepak Alur, et al, $37.95, 37% Off!
- The JFC Swing Tutorial: A Guide to Constructing GUIs; Kathy Walrath, et al, $37.95, 37% Off!
Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:
JDBC API Tutorial and Reference, Third Edition,
provides the definitive description of the JDBC™ API, the technology that
enables universal data access for the Java™ programming language. This
new edition has been updated and expanded to cover the entire JDBC 3.0 API,
including the java.sql package and the javax.sql
package, the package that facilitates building server-side applications.
Containing in-depth explanations that go beyond the specification,
this complete resource pairs a step-by-step tutorial with a comprehensive reference
to all of the classes and interfaces.
For those new to Java technology, the book includes an introduction
to the Java programming language and to SQL. It builds on this basic knowledge
to walk you through creating a JDBC application-from setting up a database and
establishing a connection to retrieving values from result sets and using prepared
statements. In addition, the authors provide many examples along the way that
demonstrate how to execute common tasks. The book proceeds to more advanced
topics, focusing on features such as scrollable and updatable result sets, batch
updates, SQL99 data types, custom mapping, savepoints, statement pooling, automatically
generated keys, and more.
In addition to in-depth coverage of the JDBC metadata API, the
book gives you the latest information on rowsets, the technology that makes
it possible to handle data sets as JavaBeans™ components.
As an added bonus, you get a preview of the standard implementations
for JdbcRowSet, CachedRowSet,
WebRowSet, JoinRowSet, and FilteredRowSet
objects.
From Array to XADataSource,
an easy-to-use alphabetical reference provides concise but complete information
on each class and interface in the JDBC API. Each entry includes an overview
with usage examples as well as a comprehensive explanation of the methods and
fields.
A chapter on mapping SQL types and types in the Java programming
language, an appendix for driver writers, an appendix summarizing the new features
in the JDBC 2.0 and 3.0 APIs, and a glossary complete this indispensable resource
for all database programmers.
Table of Contents
Acknowledgments.
PART ONE.
1. Introduction.
What the JDBC 3.0 API Includes.
Conventions Used in This Book.
Contents of the Book.
What Is the JDBC API?
The JDBC API and the Java Platforms.
Java Overview.
Relational Database Overview.
2. Basic Tutorial.
Getting Started.
Setting Up a Database.
Establishing a Connection.
Setting Up Tables.
Getting Data from a Table.
Retrieving Values from Result Sets.
Updating Tables.
Milestone: The Basics of JDBC.
Using Prepared Statements.
Using Joins.
Using Transactions.
Stored Procedures.
Creating Complete JDBC Applications.
Running the Sample Applications.
Sample Code.
Creating an Applet from an Application.
Stored Procedures Using SQLJ and the JDBC API.
3. Advanced Tutorial.
Getting Set Up to Use the JDBC 2.0 and 3.0 API.
Moving the Cursor in Scrollable Result Sets.
Making Updates to Updatable Result Sets.
Making Batch Updates.
SQL99 Data Types.
Using Custom Mapping.
Using a DataSource Object.
JDBC 3.0 Functionality.
4. MetaData Tutorial.
Using a ResultSetMetaData Object.
Using a DatabaseMetaData Object.
Methods Added in the JDBC 2.0 Core API.
Methods Added in the JDBC 3.0 API.
Using a ParameterMetaData Object.
Generic Applications.
5. Rowset Tutorial.
Types and Uses of Rowsets.
Using a Rowset.
An EJB Example.
PART TWO.
6. Array.
Array Overview.
Array Interface Definition.
Array Methods.
7. BatchUpdateException.
BatchUpdateException Overview.
BatchUpdateException Class Definition.
BatchUpdateException Constructors.
BatchUpdateException Methods.
8. Blob.
Blob Overview.
Blob Interface Definition.
Blob Methods.
9. CallableStatement.
CallableStatement Overview.
CallableStatement Definition.
CallableStatement Methods.
10. Clob.
Clob Overview.
Clob Interface Definition.
Clob Methods.
11. Connection.
Connection Overview.
Connection Interface Definition.
Connection Methods.
Connection Fields.
12. ConnectionEvent.
ConnectionEvent Overview.
ConnectionEvent Interface Definition.
ConnectionEvent Constructors.
ConnectionEvent Methods.
13. ConnectionEventListener.
ConnectionEventListener Overview.
ConnectionEventListener Interface Definition.
ConnectionEventListener Methods.
14. ConnectionPoolDataSource.
ConnectionPoolDataSource Overview.
ConnectionPoolDataSource Interface Definition.
ConnectionPoolDataSource Methods.
15. DatabaseMetaData.
DatabaseMetaData Overview.
DatabaseMetaData Interface Definition.
DatabaseMetaData Methods.
DatabaseMetaData Fields.
16. DataSource.
DataSource Overview.
DataSource Interface Definition.
DataSource Methods.
17. DataTruncation.
DataTruncation Overview.
DataTruncation Class Definition.
DataTruncation Constructor.
DataTruncation Methods.
18. Date.
Date Overview.
Date Class Definition.
Date Constructors.
Date Methods.
19. Distinct Types.
Distinct Types Overview.
20. Driver.
Driver Overview.
Driver Interface Definition.
Driver Methods.
21. DriverManager.
DriverManager Overview.
DriverManager Class Definition.
DriverManager Methods.
22. DriverPropertyInfo.
DriverPropertyInfo Overview.
DriverPropertyInfo Class Definition.
DriverPropertyInfo Constructor.
DriverPropertyInfo Fields.
23. ParameterMetaData.
ParameterMetaData Overview.
ParameterMetaData Interface Definition.
ParameterMetaData Methods.
ParameterMetaData Fields.
24. PooledConnection.
PooledConnection Overview.
PooledConnection Interface Definition.
PooledConnection Methods.
25. PreparedStatement.
PreparedStatement Overview.
PreparedStatement Interface Definition.
PreparedStatement Methods.
26. Ref.
Ref Overview.
Ref Interface Definition.
Ref Methods.
27. ResultSet.
ResultSet Overview.
ResultSet Interface Definition.
ResultSet Methods.
ResultSet Fields.
28. ResultSetMetaData.
ResultSetMetaData Overview.
ResultSetMetaData Interface Definition.
ResultSetMetaData Methods.
ResultSetMetaData Fields.
29. RowSet.
RowSet Overview.
Standard Implementations.
RowSet Interface Definition.
RowSet Methods.
RowSet Fields.
30. RowSetEvent.
RowSetEvent Overview.
RowSetEvent Interface Definition.
RowSetEvent Constructor.
RowSetEvent Methods.
31. RowSetInternal.
RowSetInternal Overview.
RowSetInternal Interface Definition.
RowSetInternal Methods.
32. RowSetListener.
RowSetListener Overview.
RowSetListener Interface Definition.
RowSetListener Methods.
33. RowSetMetaData.
RowSetMetaData Overview.
RowSetMetaData Interface Definition.
RowSetMetaData Methods.
RowSetMetaData Fields.
34. RowSetReader.
RowSetReader Overview.
RowSetReader Interface Definition.
RowSetReader Methods.
35. RowSetWriter.
RowSetWriter Overview.
RowSetWriter Interface Definition.
RowSetWriter Methods.
36. Savepoint.
Savepoint Overview.
Savepoint Interface Definition.
Savepoint Methods.
37. SQLData.
SQLData Overview.
SQLData Interface Definition.
SQLData Methods.
38. SQLException.
SQLException Overview.
SQLException Class Definition.
SQLException Constructors.
SQLException Methods.
39. SQLInput.
SQLInput Overview.
SQLInput Interface Definition.
SQLInput Methods.
40. SQLOutput.
SQLOutput Overview.
SQLOutput Interface Definition.
SQLOutput Methods.
41. SQLPermission.
SQLPermission Overview.
SQLPermission Class Definition.
SQLPermission Constructors.
42. SQLWarning.
SQLWarning Overview.
SQLWarning Class Definition.
SQLWarning Constructors.
SQLWarning Methods.
43. Statement.
Statement Overview.
Statement Interface Definition.
Statement Methods.
Statement Fields.
44. Struct.
Struct Overview.
Struct Interface Definition.
Struct Methods.
45. Time.
Time Overview.
Time Class Definition.
Time Constructors.
Time Methods.
46. Timestamp.
Timestamp Overview.
Timestamp Class Definition.
Timestamp Constructors.
Timestamp Methods.
47. Types.
Overview of Class Types.
Types Class Definition.
48. XAConnection.
XAConnection Overview.
XAConnection Interface Definition.
XAConnection Methods.
49. XADataSource.
XADataSource Overview.
XADataSource Interface Definition.
XADataSource Methods.
50. Mapping SQL and Java Types.
Mapping Overview.
Mapping SQL Types to Java Types.
Basic JDBC Types.
Advanced JDBC Data Types.
JDBC Types Added in the JDBC 3.0 API.
Examples of Mapping.
Custom Mapping.
Dynamic Data Access.
Storing Java Objects in a Database.
Tables for Type Mapping.
Appendix A. For Driver Writers.
Requirements for All Drivers.
Requirements for JDBC 1.0 API Compliance.
Requirements for JDBC 2.0 API Compliance.
Requirements for JDBC 3.0 API Compliance.
API That Is Already Implemented.
Additional Requirements.
Permitted Variants.
Security Responsibilities of Drivers.
Use SQLException for Exceptions.
Implementation Suggestions.
Connection and Statement Pooling Implementations.
JDBC Test Suite.
Connectors.
Appendix B. Summary of Changes.
Overview of JDBC 3.0 API Changes.
Summary of New Functionality.
Complete List of JDBC 3.0 API Changes.
Overview of JDBC 2.0 Core API Changes.
Summary of New Functionality.
JDBC 2.0 Core API Changes.
JDBC Optional Package Features.
Complete List of Optional Package API.
Post JDBC 1.0 API Changes.
Early Design Decisions.
Where to Send Suggestions.
Glossary.
Index
Author Bio
Maydene Fisher, a native of San Jose, specializes in object-oriented
languages. She has experience spanning both coasts of the United States, having
documented everything from complex financial models on Wall Street to Java APIs
in Silicon Valley.
Jon Ellis, author of the JDBC 3.0 API specification, has been working with
database systems for the last ten years. Currently based in Tokyo, Japan, he is
now leading several Java Community Process specifications in the wireless space.
Jonathan Bruce, who previously worked on JNDI technology
in Ireland and is now based in Santa Clara, California, has worked on the specifications
for the JDBC 3.0 API, the RowSet implementations, and the JDBC API subset for
use with wireless devices.
|