LONG columns in ALLBASE/SQL enable you to store a very large
amount
of binary data in your database, referencing that data via a table
column name. You might use LONG columns to store text files, software
application code, voice data, graphics data, facsimile data, or test
vectors.
You can easily SELECT or FETCH this data, and you have
the
advantages of ALLBASE/SQL's recoverability, concurrency control, locking
strategies, and indexes on related columns.
You can use LONG columns in an application program to be preprocessed
or with ISQL.
This discussion focuses on application programming concerns.
As you will see, great flexibility is provided so that you can custom design
your application.
The chapter highlights methods of implementing LONG columns in your
database as follows:
Defining LONG Columns with CREATE TABLE or ALTER TABLE.
Defining Input and Output with the LONG Column I/O String.
Putting Data into a LONG Column with [BULK] INSERT.
Changing a LONG Column with UPDATE [WHERE CURRENT].
Retrieving LONG Column Data with [BULK] SELECT, FETCH, or REFETCH.
Using the LONG Column Descriptor.
Removing LONG Column Data with DELETE or DELETE WHERE CURRENT.
For every DDL and DML command that can be used with LONG columns,
examples are included with discussion of related considerations.
These examples pertain to the same logical table (PartsTable) and
set of columns.
In contrast to other examples in this document, PartsTable is a hypothetical
table created and altered in this chapter.
Refer to the ALLBASE/SQL Reference Manual which contains complete syntax specifications for using
long columns.
Table 10-1 Commands You Can Use with LONG Columns
| DDL Operations | | DML Operations |
---|
| ALTER TABLE | | [BULK] INSERT |
| CREATE TABLE | | UPDATE [WHERE CURRENT] |
| | | [BULK] SELECT |
| | | FETCH |
| | | REFETCH |
| | | DELETE [WHERE CURRENT]
|