SQLIO Overview


9.5

The SQLIO feature allows the use of normal PLB IO instructions (OPEN, READ, WRITE, etc.) to access SQL database tables. Existing PL/B programs that peform flat file IO can be transformed into database application simply without the need to implement SQL instructions.

 

Before the SQLIO operations can be performed, user schema information must be provided to specify the record layouts which define the field positions that correspond to columns in a SQL table.

Definitions

 

Term

Meaning

SQLIO

A sub system that is implemented into the Sunbelt runtimes allowing execution of PLB IO instructions that use SQL language statements to access and manipulate SQL database tables.

SQLIO Schema

A text file in XML format that specifies the file names and record layouts that defines how SQL database table columns are associated and used during the SQLIO operations.

SQLIO System Tables

SQL database tables that contain the SQLIO schema information and are used during the execution of PL/B instructions. The system tables are automatically created if they do not exist when SQLIO schema data is being loaded.

 

The SQLIO system tables are named:

 

Sun_Sqlio_Afile

Sun_Sqlio_Alias

Sun_Sqlio_Columns

Sun_Sqlio_Databases

Sun_Sqlio_File

Sun_Sqlio_Ifile

Sun_Sqlio_Version

 

All SQL tables created, accessed, and manipulated by PL/B IO using SQLIO requires a unique SQL data column that sequences the SQL table rows. This unique column provides consistent behavior as PL/B IO operations are executed. When a SQLIO table is created, a required column named 'sun_recno' is created. The 'sun_recno' column provides unique values that support all PL/B IO instructions including direct, ISAM, and AAM IO. The 'sun_recno' is automatically created and maintained by the runtime and is transparent to the end-user application.

 

 

See Also: SQLIO Runtime Keywords, SQLIO Getting Started



PL/B Language Reference SQLIO Runtime Keywords