Previous Topic: The Database of iSeriesNext Topic: Data Modeling


The iSeries Database as a Relational Database

In essence, the database of iSeries is relational—data is kept in ‘flat’ tables and may be assembled into logical views. It has facilities for building access paths to assemble, order, and select data. The database has built-in facilities for recovery (via journaling and commit control), security, integrity, and concurrency control. It falls short however, of the full theoretical implementation of a relational database in a number of ways.

For instance:

Much of the system information may, however, be materialized into an accessible format using the OUTFILE parameter on the various OS/400 display commands. From V2R1, there are also APIs to retrieve some of the information. The SQL/400 interface to the database has SQL catalog facilities that may be queried, using SQL.

Selection can be specified in DDS (but is early binding).

A join can be specified in DDS (but is early binding). Fields from the secondary join file may not be used as key fields. The HLL read equal statement (for instance RPG III ‘READE’,) gives what is in essence access to a set of data.

Set level operations are of significance in that they provide a greater level of economy in specifying programs—in relational languages such as SQL, a single statement may often serve to specify what would be in most HLL’s be a ‘Do loop’ containing many lines of code.

The OPNQRYF command allows for dynamic joins and selections.

SQL/400 provides join specifications and a number of set level operations.

Overall, the database of iSeries can be characterized as relational, but ‘early binding’—information about how to use the database information is incorporated at compile time rather than execution time.