Monday, January 19, 2009

9.1 Mapping Overview

Because data types in SQL and data types in the Java programming language ("Java types") are not identical, there needs to be some mechanism for transferring data between an application using Java types and a database using SQL types.
In order to transfer data between a database and an application written in the Java programming language, the JDBC API provides three sets of methods:

13. Methods on the ResultSet class for retrieving SQL SELECT results as Java types
14. Methods on the PreparedStatement class for sending Java types as SQL statement parameters
15. Methods on the CallableStatement class for retrieving SQL OUT parameters as Java types

This section brings together information about data types affecting various classes and interfaces and puts all the tables showing the mappings between SQL types and Java types in one place for easy reference. It also describes each of the generic SQL data types, including the SQL99 types.

0 Comments: