Data model for Archive Service

A data model provides a generalized view of data that represents the real data for your business.

The following table describes the data model for Archive Service, which stores data in the osa_order_archive table.

Column name Type Valid values Description
o_id Text UUID or OHK of the order Indicates a single attribute value, which uniquely identifies an order. Sterling Order Management System Software can use either the OrderHeaderKey attribute or a generated unique value that is used across Order Search and Archive Service as the unique identifier for an order.
part_name Text Order, orderLine, or orderAudit Indicates what part of the order data is stored in this row. For example, if Sterling Order Management System Software sends order and order line information of an order separately, they are stored in this table in two rows against part_name=‘order’ and part_name=‘orderLine’.
end_seq Integer 0 (zero) or a positive number.

0 (zero) for non-repeating and single data. For repeating data, it is the end sequence for that row.

0 indicates that the data in current row is not part of a list. The end_seq value for the partname as ‘order’ is always 0 or when an entity that contains 1:1 relationship with an order, which is stored in a separate row.

If end_seq is greater than 0, it indicates that the data that is stored in this row is part of a list. For entities that have one-to-many relationships with OrderHeader in Sterling Order Management System Software with huge data, such as orderLine, can be stored in multiple rows with the sequence number of the last line being end_seq number.

This column is needed for pagination purpose. Pagination is supported for entities and rows that contain end_seq greater than 0.

start_seq Integer 0 (zero) or a positive number.

0 (zero) for non-repeating and single data. For repeating data, it is the start sequence for that row.

0 indicates that the data in current row is not part of a list. The start_seq value for the partname as ‘order’ is always 0 or when an entity contains 1:1 relationship with an order is stored in a separate row.

If start_seq is greater than 0, it indicates that the data that is stored in this row is part of a list. The sequence number for the starting line that is stored in that row is its start_seq number.

format tinyint [1..5] Refers to an integer value, which indicates the format in which the data is stored.
The following table describes the format in which the data is stored:
Column value 8-bit binary representation Interpretation
1 00000001 Data is available in a valid JSON format.
2 00000010 Data is represented as text, but may not be a valid JSON.
3 00000011 Data is stored in both JSON and text format.
4 00000100 Data is represented in the BLOB format.
5 00000101 Data is stored in both JSON and BLOB format.
json Text JSON data Stores a valid JSON document.
clob Text Non-JSON text data Stores plain text file data such as XML.
blob BLOB Binary data Data in binary form.
o_dt Date yyyy-mm-dd format Date to track order in Archive Service.
Note:
  • Three columns are defined to store data in three different formats, namely JSON, CLOB, and BLOB. One or more of these columns are used to store data. The format value indicates the columns that are used to store and fetch the data.
  • Currently, the JSON format is supported for data.