Multi-row array table

The multi-row array table format maps a Service Manager array field as a character string within one or more rows in an alias table. This array format is good for situations where the following conditions apply:

  • You want to be able to run RDBMS queries on your array data
  • You want to be able to use third-party tools to run reports against your array data
  • You want the option to store very large array elements
  • You want to support simple arrays of structure

The following table summarize the advantages of using this array mapping format.

Advantages
Advantage Description
The RDBMS can directly query the array In this array format, Service Manager stores each array element as a simple character string in one or more rows. This format allows RDBMS queries to read each individual array element without needing to forward the query to Service Manager for evaluation.
Third-party tools can report against the array Service Manager stores each element of the array in its own separate row. Third-party reporting tools can read the row and extract the element value.
There is no risk of data truncation for new array elements Each array element occupies as many rows as necessary to store the full element. This means that the length of the array element is not limited by the length of the column. Any array element that exceeds the column length for one row continues onto the next row. This feature prevents Service Manager from truncating array element data.
Support for simple arrays of structure This array format supports simple arrays of structure such as an array of structure within an array of structure.

The following table summarize the disadvantages of using this array mapping format.

Disadvantages
Disadvantage Description
Service Manager must maintain a separate table In order to fetch a record, the system must make SELECT and JOIN statements between the main and alias tables. These statements require more RDBMS traffic and can lower your RDBMS performance.
The array uses more table rows Each array element will require one or more table rows. Each time you fetch an array record, the system must select multiple rows from an alias table. The more rows the system has to select, the more costly your record retrieval is in terms of RDBMS performance.

To set up an array in a field in main table mapping, you must create the following mappings in a database dictionary record.

Database dictionary element type RDBMS mapping required
Array data type Mapped to an alias table
Sub-field of the array Mapped as a character column in a main table
RC flag False