Field in main table

The field in main table format maps a Service Manager array field as a character large object (CLOB) within a main table. This array format is good for situations where the following conditions apply:

  • 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 do not want to re-map an existing array

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

Advantages
Advantage Description
Third-party tools can report against the array Service Manager stores array data as a character string that third-party reporting tools can read. The system separates each element of the array with a \n character delimiter.
The array can store very large array elements Since the array is mapped to a character large object column, the column can occupy a large amount of space. Most RDBMS vendors support at least 2 gigabytes of large object data in such a column.
The array has access to other fields in the main table There is a greater probability that other fields reside in the same main table as the array. Having all or most of your fields in a main table reduces the number of SELECT and JOIN statements your system has to make to fetch a record. The less RDBMS traffic required, the better performance your queries and reports will have.
There is no need to re-map if you use the default array mapping format The field in main table format is Service Manager's out-of-box array mapping format. Unless someone has changed the default array mapping format, all your array data will automatically be in this format.

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

Disadvantages
Disadvantage Description
The RDBMS cannot directly query the array Most RDBMS vendors cannot query a column containing a reference to character large object data.
Any query against the array is inefficient The RDBMS cannot directly query this array format because the column is mapped to a large object data type. Instead, the RDBMS must scan the table to return all rows of the large object column, and then forward the results to Service Manager for evaluation.
The array shares table space with other fields in the table The array does not have a dedicated table in which to store data. Each RDBMS vendor has its own rules to determine the maximum number of columns allowed in a table, the maximum size of any row, and the maximum table size. Any array in a main table will consume some of these RDBMS resources. If an array requires more resources than any one main table can provide, Service Managerwill move the array to another main table.

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 Not mapped
Sub-field of the array Mapped as a CLOB column in a main table
RC flag False