HPlogo ALLBASE/SQL Pascal Application Programming Guide: HP 9000 Computer Systems

Chapter 12 Programming with LONG Columns

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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:

  • General Concepts.

  • Restrictions.

  • Defining LONG Columns with the CREATE TABLE or ALTER TABLE command.

  • Defining Input and Output with the LONG Column I/O String.

  • Putting Data into a LONG Column with INSERT.

  • Retrieving LONG Column Data with SELECT, FETCH, or REFETCH.

  • Changing a LONG Column with UPDATE [WHERE CURRENT].

  • Using the LONG Column Descriptor.

  • Removing LONG Column Data with DELETE or DELETE WHERE CURRENT.

  • Coding Considerations.

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 chapter, 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 12-1 Commands You Can Use with LONG Columns

DDL OperationsDML Operations
ALTER TABLEINSERT
CREATE TABLEUPDATE [WHERE CURRENT]
 SELECT
 FETCH
 REFETCH
 DELETE [WHERE CURRENT]

 

Feedback to webmaster