General Concepts [ ALLBASE/SQL FORTRAN Application Programming Guide ] MPE/iX 5.0 Documentation
ALLBASE/SQL FORTRAN Application Programming Guide
General Concepts
ALLBASE/SQL stores LONG column data in a database for later retrieval.
LONG column data is not processed by ALLBASE/SQL. Any formatting,
viewing, or other processing must be accomplished by means of your
program. For example, you might use a graphics application to create an
intricate graphic display (or set of graphic displays). You could then
write a program in which you embed ALLBASE/SQL commands to store each
graphics file in your database along with related data in a given row.
Your graphics application could be called from another program, this time
to select a row and display the graphic. The graphic could be displayed
on the upper portion of a screen, with related data from the same row
displayed on the lower portion of a screen. The related data in standard
columns or LONG columns could be a graphics explanation or an entire
chapter.
LONG column data can occupy a practically unlimited amount of space in
the database, the maximum number of bytes being 231-1 (or 2,147,483,647)
per LONG column per row. Standard column data is restricted to 3996
bytes maximum.
The LONG specification is used with a given ALLBASE/SQL data type when
you create the LONG column. Currently, LONG BINARY and LONG VARBINARY
are available. Refer to the chapter on "Host Variables" for the details
of BINARY and VARBINARY data types.
The concept of how LONG column data is stored in a row and retrieved
differs from that of standard columns. Although LONG column data is
associated with a particular row, it can be stored separately from the
row. Thus you can specify a DBEFileSet in which to store data for a LONG
column.
During an INSERT or UPDATE operation, you specify a LONG column I/O
string to indicate where LONG column input data is located and where that
data is to be placed when it is later selected or fetched. You indicate
either an operating system file or random random heap space.
A LONG column descriptor (rather than the data itself) is selected or
fetched into a host variable. Figure 11-1 and Figure 11-2
illustrate these concepts.
Figure 11-1. Flow of LONG Column Data and Related Information to the Database
Figure 11-2. Flow of LONG Column Data and Related Information from the Database
MPE/iX 5.0 Documentation