Java Reference
In-Depth Information
First_Name
VARCHAR (20)
MI
CHAR(1)
Last_Name
VARCHAR(30)
Street
VARCHAR(50)
City
VARCHAR(30)
State
CHAR(2)
Zip
CHAR(10)
In another application, you might create a second table of names and addresses,
perhaps this time with different field sizes or even additional fields.
From a design viewpoint, the ability to define a class or structure can be used across
the board is very attractive.
An object relational database provides the necessary tools to support this approach
with User Defined Data Types (UDTs).
Using SQL3 Data Types
The new SQL3 data types that the JDBC 2.0 Extension supports include the
following:
 
BLOB (Binary Large Object), which can store very large amounts of data as raw bytes
 
CLOB (Character Large Object), which can store very large amounts of character data
 
ARRAY, which can store an array as a column value
 
User Defined Types
 
Structured, object relational types
 
The DISTINCT type
The following list provides the JDBC 2.0 interfaces that map SQL3 types. We discuss
them in more detail later in this chapter.
 
A Blob instance maps an SQL BLOB value.
 
A Clob instance maps an SQL CLOB value.
 
An Array instance maps an SQL ARRAY value.
 
A Struct instance maps an SQL structured type value.
 
A Ref instance maps an SQL REF value.
SQL3 data types are retrieved, stored, and updated in the same way as other data
types, using the methods shown in Table 4-6 .
Search WWH ::




Custom Search