syst_hierarchy_items


Description

Hierarchy Item records represent a level in the hierarchy of their parent Hierarchy.

General Usage

Each Hierarchy Item record is individually sequenced in its group via the hierarchy_depth column.

Note that once the Hierarchy is active and in use by Hierarchy implementing Components, most changes to the Hierarchy Item records will not be allowed to ensure the consistency of currently used data.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 uuid_generate_v7()

The record’s primary key. The definitive identifier of the record in the system.

General Usage

This column is system maintained and should be considered read only in normal operations.

internal_name text 2147483647 null

A candidate key useful for programmatic references to individual records.

General Usage

This column is system maintained and should be considered read only in normal operations.

display_name text 2147483647 null

A friendly name and candidate key for the record, suitable for use in user interactions

General Usage

This column is system maintained and should be considered read only in normal operations.

external_name text 2147483647 null

A non-unique/non-key value used to display to users and external parties where uniqueness is less of a concern than specific end user presentation.

hierarchy_id uuid 2147483647 null
syst_hierarchies.id syst_hierarchy_items_hierarchy_fk C

Identifies the Hierarchy to which the record belongs.

hierarchy_depth int2 5 null

Indicates the at what level in the hierarchy this Group Type Item sits relative to the other items in the Group Type. Records with relatively higher values are deeper or lower in the hierarchy.

General Usage

When a value for this column is not provided at insert time, the record is assigned the next hierarchy depth value relative to the existing records. When a record is inserted with a set hierarchy_depth value and that value pre-exists for the same Group Type as the new record, the insert is treated as a “insert above” operation, with the existing conflicting record being updated to have the next hierarchy value; existing Group Type Item records are continued to be updated until the last record is assigned a non-conflicting hierarchy_depth value.

required bool 1 true

Indicates if the Hierarchy Item level must be represented by a record in the implementing data, or if the Hierarchy Item level represents an optional level. If true, the Hierarchy Item level must be represented by a record in the data of the implementing Component for that data to be considered valid. If false, the Hierarchy Item level is considered optional and the data of the implementing Component may omit the Hierarchy Item level in its data without the data being considered invalid.

General Usage

The highest/root Hierarchy Item level must always be required. If lower levels of the Hierarchy are required, all parents to the lowest required Hierarchy Item level must also be marked as required true.

allow_leaf_nodes bool 1 false

Indicates to implementing Components that this Hierarchy Item level can be associated with “Leaf Nodes”. Leaf Nodes are not defined in the mscmp_syst_hierarchy Component, but are rather defined by Hierarchy implementing Components. Leaf Nodes are the records which the Branch Nodes/Hierarchy definition are organizing. An example of a Leaf Node would be an application menu implementing Component defining references/links to specific application functionality which are then displayed associated to branches of a tree structure (menu/sub-menu/ etc.) The links are Leaf Nodes and the branches of the menu are Branch Nodes: representations of the Hierarchy Items.

General Usage

If this value is true, it means this Hierarchy Item record may be associated directly with Leaf Nodes. If false, Leaf Nodes must be associated with other levels of the Hierarchy.

The bottom/lowest level required Hierarchy Item must always be marked as allow_leaf_nodes true. Higher than the lowest required Hierarchy Item level may arbitrarily allow or disallow Leaf Node associations as the implementing Component sees fit.

diag_timestamp_created timestamptz 35,6 now()

The database server date/time when the transaction which created the record started.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_role_created text 2147483647 null

The database role which created the record.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_timestamp_modified timestamptz 35,6 now()

The database server date/time when the transaction which modified the record started. This field will be the same as diag_timestamp_created for inserted records.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_wallclock_modified timestamptz 35,6 clock_timestamp()

The database server date/time at the moment the record was actually modified. For long running transactions this time may be significantly later than the value of diag_timestamp_modified.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_role_modified text 2147483647 null

The database role which modified the record.

General Usage

This column is system maintained and should be considered read only in normal operations.

diag_row_version int8 19 1

The current version of the row. The value here indicates how many actual data changes have been made to the row. If an update of the row leaves all data fields the same, disregarding the updates to the diag_* columns, the row version is not updated, nor are any updates made to the other diag_* columns other than diag_update_count.

General Usage

This column is system maintained and should be considered read only in normal operations.

Direct Usage

This column is frequently used by by application logic to resolve the “dirty write” issues which can arise from concurrent data changes. As such any administrative override of automatic system maintenance of this value should consider the ramifications on application function.

diag_update_count int8 19 0

Records the number of times the record has been updated regardless as to if the update actually changed any data. In this way needless or redundant record updates can be found. This row starts at 0 and therefore may be the same as the diag_row_version - 1.

General Usage

This column is system maintained and should be considered read only in normal operations.

Indexes

Constraint Name Type Sort Column(s)
syst_hierarchy_items_pk Primary key Asc id
syst_hierarchy_items_depth_udx Must be unique Asc/Asc hierarchy_id + hierarchy_depth
syst_hierarchy_items_display_name_udx Must be unique Asc display_name
syst_hierarchy_items_internal_name_udx Must be unique Asc internal_name

Relationships