SQLIO Supported Tables


9.6B

The PL/B SQLIO implementation requires that any SQL Table accessed using PL/B instructions must have a unique column whose unique data simulates the PL/B instruction behaviors. With this SQLIO implementation requirement, there are three kinds of SQL table that are supported:

 

SQL Table Created by SQLIO PL/B PREP:
When a SQL table is created using a PL/B PREP instruction for SQLIO, the SQLIO table has a required SQL identity column named 'sun_recno'. The 'sun_recno' column is automatically maintained by the SQL database engine to provide an incrementing numeric value that allows SQLIO operations to simulate PL/B instructions.

 

SQL Table Created with User SQL Identity column:
If a SQL table is created with a SQL identify column that is not named 'sun_recno', the SQLIO operations can only use a SQL table like this when the SQLIO schema specifies the SQL_IDENTITY column type in the sql_type configuration settings found in the Sun_Sqlio_Columns administrative table. In this case, the SQLIO implementation simply substitutes the end-user SQL Identity column name in place of the 'sun_recno' column name. In this case, the SQLIO implementation can simulate the PL/B instructions as normally expected.

 

SQL Native Table Created without any SQL Identity column:
If a SQL table is created without any SQL identity columns, this table is considered a 'SQL Native Table' that requires a unique SQL prime key to allow SQLIO operations to simulate restricted PL/B IO. In this case, one or more columns must be configured in the SQLIO schema to specify the SQL prime key required for SQLIO operations.

Note for SQL Native Tables:

  1. See the '<File> Schema Record' descriptions for the <unique_col> tag description on configuring a SQL prime key for a table.

  2. A SQL prime key is composed of unique column data written into a SQL row by an application. The SQL prime key data is not automatically maintained by the SQL database engine. Since the SQL prime key is unique, the SQLIO operations can use it to perform simulated PL/B IO operations except for direct FILE variable IO. The Direct FILE variable PL/B IO operations require a numeric record\row order and since the SQL prime keys do not provide a numeric ordering, the SQLIO implementation cannot use SQL prime keys to simulate the Direct FILE variable IO.

 

 

See Also: SQLIO Overview, SQLIO Runtime Keywords, SQLIO Getting Started

 



PL/B Language Reference SQLIO Database Engine Notes SQLIO Examples