In this article:

Description

Structure of System Metadictionaries

Structure of fact metadictionary

Structure of time series values metadictionary

Features of values metadictionary

Structure of revisions metadictionary

Structure of validation rule execution metadictionary

Structure of metadictionary of exceptions detected by validation rules

Features of Data Storage in Time Series Database

Description

To store data, time series database uses several child system metadictionaries located in the Data folder. Metadictionaries are created automatically on creating a time series database.

Metadictionary data can be accessed from the object navigator or by means of the Fore language using the methods: IRubricator.GetDictionary and IRubricatorInstance.GetDictionary.

Structure of System Metadictionaries

See below the structure of main system metadictionaries used to store data in time series database.

Structure of fact metadictionary

Fact metadictionary contains data about time series contained in time series database.

Metadictionary name is created according to the following scheme: Facts_<time series database name>. For example, a time series metadictionary in the Statistics time series database is named facts_Statistics.

A metadictionary may contain the following attribute types: system or user ones. System attributes are created automatically on creating a time series database. User attributes are created if a user creates additional time series attributes.

System attributes of fact metadictionary:

Attribute name Description
Key

Primary key.

Attribute parameters:

  • Attribute identifier: KEY.

  • Data type: Integer.

  • Attribute features: Empty values are not allowed.

Fact

Time series key.

Attribute parameters:

  • Attribute identifier: FACTOR.

  • Data type: Integer.

  • Attribute features: Empty values are not allowed.

Revision

Revision key.

Attribute parameters:

  • Attribute identifier: REV.

  • Data type: Integer.

  • Attribute features: Empty values are not allowed.

Frequency

Time series calendar frequency. Frequency is determined by the DimCalendarLevel enumeration.

Attribute parameters:

  • Attribute identifier: DL.

  • Data type: Integer

  • Attribute features: Empty values are not allowed. Default value is 1.

Unit

Measurement unit for series values.

Attribute parameters:

  • Attribute identifier: UNIT.

  • Data type: Integer

  • Attribute features: If measurement units are a mandatory series attribute, empty values are not allowed; if measurement units are not a mandatory series attribute, empty values are allowed.

Object

key of repository object connected to series. Value is edited only by means of Fore.

Attribute parameters:

  • Attribute identifier: OBT.

  • Data type: Integer.

Mnemonic

Time series mnemonic. Mnemonic is a unique value generated based on time series attribute values and is used as a series name.

Attribute parameters:

  • Attribute identifier: MNEMO.

  • Data type: String.

  • Attribute features: Empty values are not allowed. Default length is 255 characters. The attribute is present if on creating a time series database it was specified that series have identifiers.

The attribute may be absent in metadictionary. Presence or absence of the attribute is controlled by the IRubricator.HasMnemonics property.

Removed

Indicates whether a time series is removed. Available values:

  • True. The series is present in time series database.

  • False. Default value. The series is removed.

Attribute parameters:

  • Attribute identifier: DLT.

  • Data type: Logical.

  • Attribute features: Empty values are not allowed.

Empty

Indicates whether a time series is empty, and a series is considered empty is it does not contain data. Available values:

  • True. Default value. The series is empty.

  • False. Series contains data.

Attribute parameters:

  • Attribute identifier: EMPT.

  • Data type: Logical.

  • Attribute features: Empty values are not allowed. The attribute is present if on creating a time series database was specified that series are empty.

The attribute may be absent in metadictionary. Presence or absence of the attribute is controlled by the IRubricator.HasEmptyAttribute property.

Structure of time series values metadictionary

Values metadictionary contains values of time series observations.

Metadictionary name is created according to the following scheme: Values_<time series database name>. For example, metadictionary of time series values is named Values_Statistics in the Statistics time series database.

A metadictionary may contain the following attribute types: system or user ones. System attributes are created automatically on creating a time series database. User attributes are created if a used creates additional attributes of observations.

System attributes of metadictionary of time series values:

Attribute name Description
Key

Primary key.

Attribute parameters:

  • Attribute identifier: KEY.

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Fact

Key of the time series, to which observation belongs.

Attribute parameters:

  • Attribute identifier: FACTOR.

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Revision

Key of the revision, to which observation value is set or changed.

Attribute parameters:

  • Attribute identifier: REV

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Frequency

Calendar frequency of observation. Frequency is determined by the  enumeration.

Attribute parameters:

  • Attribute identifier: DL.

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Date

Date, to which observation value is set.

Attribute parameters:

  • Attribute identifier: DT.

  • Data type: Data.

  • Attribute features: Empty values are not allowed.

Scenario

Scenario key, to which observation belongs. If the value is -1, the observation belongs to the Fact scenario.

NOTE. The attribute is absent if a time series database does not support scenarios. For details see description of the  property.

Attribute parameters:

  • Attribute identifier: SC.

  • Data type: Integer

  • Attribute features: Empty values are not allowed. The default value is -1.

Value

Observation value.

Attribute parameters:

  • Attribute identifier: VL.

  • Data type: Real.

  • Attribute features: Total length - 30 characters, number of decimal places - 8.

Comment

Comment to observation.

Attribute parameters:

  • Attribute identifier: CMT.

  • Data type: String

  • Attribute features: Default length is 255 characters.

Features of values metadictionary

If a time series database uses an MS SQL DBMS based database, the VL attribute can be allowed to have any total length of characters. To do this, use the procedure given below.

The procedure is given for a time series database with the TSDB identifier.

Add links to the Cubes, Metabase, Rds system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    rub: IRubricator;
    attr: IMetaAttribute;
Begin
    mb := MetabaseClass.Active;
    rub := mb.ItemById("TSDB").Edit As IRubricator;
    attr := rub.EditValues.Attributes.FindById("VL");
    attr.FieldSize := 0;
    rub.AlterAndSave;
End Sub UserProc;

After executing the procedure the VL attribute can have any total length of characters in the TSDB time series database.

IMPORTANT. Restriction for a general length of characters is removed by means of setting the float data type for attribute at the DBMS level. It leads to the loss of accuracy after the 17th character.

Structure of revisions metadictionary

A revisions metadictionary contains data about revisions executed in time series database.

Metadictionary name is created according to the following scheme: Revisions_<time series database name>. For example, a revisions metadictionary may be named Revisions_Statistics in the Statistics time series database.

Attribute name Description

Key

Primary key.

Attribute parameters:

  • Attribute identifier: KEY.

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Name

Revision name.

Attribute parameters:

  • Attribute identifier: NAM.

  • Data type: String

  • Attribute features: default length is 255 characters.

Date

Revision execution date.

Attribute parameters:

  • Attribute identifier: DT.

  • Data type: Data.

View

Indicates whether this revision is displayed in the revision dictionary. Available values:

  • 0. Revision is not displayed.

  • 1. Revision is displayed.

Attribute parameters:

  • Attribute identifier: KIN.

  • Data type: Integer.

User

User who executed revision.

Attribute parameters:

  • Attribute identifier: USR.

  • Data type: String

  • Attribute features: Default length is 255 characters.

Comment

Comment to revision execution.

Attribute parameters:

  • Attribute identifier: CMT.

  • Data type: String

  • Attribute features: Default length is 255 characters.

Object

Key of the repository object, which initiated revision.

Attribute parameters:

  • Attribute identifier: OBT

  • Data type: Integer.

Structure of validation rule execution metadictionary

A metadictionary of validation rule execution contains data about validation rules and validation rule groups executed based on time series database.

Metadictionary name is created according to the following scheme: Rule executions_<time series database>. For example, a revisions metadictionary may be named Rule executions_Statistics in the Statistics time series database.

Attribute name Description

Key

Primary key.

Attribute parameters:

  • Attribute identifier: KEY.

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Name

Name of validation executions rule.

Attribute parameters:

  • Attribute identifier: NAM.

  • Data type: String

  • Attribute features: Default length is 255 characters.

Revision

Key of the revision, in which the rule is executed.

Attribute parameters:

  • Attribute identifier: REV

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Object

Key of validation rule as repository object.

Attribute parameters:

  • Attribute identifier: OBT

  • Data type: Integer.

Date

Validation rule execution date.

Attribute parameters:

  • Attribute identifier: DT.

  • Data type: Data.

Rule

The list of validation keys included into calculated validation group. If one validation is calculated, its key.

Attribute parameters:

  • Attribute identifier: CMT.

  • Data type: Integer.

Validation calculations

Indicates whether validation is calculated by a scenario.

Available values:

  • None. Validation rule is not calculated by a scenario.

  • 1. Validation rule is calculated by a scenario.

Attribute parameters:

  • Attribute identifier: BY_SC.

  • Data type: Integer.

Calculation end

Indicates whether validation rule execution is finished. Available values:

  • 0. Validation rule is being executed.

  • 1. Validation rule is already executed.

Attribute parameters:

  • Attribute identifier: FNSH.

  • Data type: Logical.

Structure of metadictionary of exceptions detected by validation rules

A metadictionary of exceptions detected by validation rules contains data about observations of the time series excluded by validation rules executed in time series database.

Metadictionary name is created according to the following scheme: Rule values_<time series database name>. For example, a revisions metadictionary may be named Rule values_Statistics in the Statistics time series database.

Attribute name Description

Key

Primary key.

Attribute parameters:

  • Attribute identifier: KEY.

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Fact

Key of the time series, to which observation belongs.

Attribute parameters:

  • Attribute identifier: FACTOR.

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Frequency

Calendar frequency of observation. Frequency is determined by the  enumeration.

Attribute parameters:

  • Attribute identifier: DL

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

Date

Observation date.

Attribute parameters:

  • Attribute identifier: DT.

  • Data type: Data.

Rule

Validation rule execution key.

The key can be used to find corresponding record in validation rule execution metadictionary.

Attribute parameters:

  • Attribute identifier: CMT.

  • Data type: Integer.

Value

Indicates whether value exists in validation exception matrix. The attribute value is 1 if exception is explained, and the attribute value is empty if exception is not explained.

Attribute parameters:

  • Attribute identifier: VL.

  • Data type: Integer.

Scenario

Scenario key, to which observation belongs. If the value is -1, the observation belongs to the Fact scenario.

NOTE. The attribute is absent if a time series database does not support scenarios. For details see description of the  property.

Attribute parameters:

  • Attribute identifier: SC.

  • Data type: Integer

  • Attribute features: Empty values are not allowed.

See also:

Developers Knowledge Base