A data model in Konstrukt builds on multi-dimensional tables (Valuetypes) and can be seen as a sort of star schema model.
- Valuetypes ~ Fact Tables
- Dimensions ~ Dimension Tables
Dimensions
Dimensions in Konstrukt are used as keys in Valuetypes. A dimension always has Code and Name columns and can optionally have other properties. The Code is a unique identifier for each dimension value.
Properties
Properties (like Dimensions) have Code and Name. However, they cannot have properties themselves and cannot be used directly in Valuetypes. Also, Properties are unique per Dimension and not shared between Dimensions. Property values can be imported via file (see steps in the images below). The file only need Code and Name.
Bound dimensions
A special case of a property is Bound Dimensions. These can be seen as nested dimensions. A dimension that is used as a Bound Dimension can also in itself be used as a Dimension directly in Valuetypes.
Valuetypes
A value type is like the Konstrukt-version of a fact table containing set of Dimensions as keys. Each row must have a dimension value for each of the included dimensions (i.e. all Dimension-columns in the Valuetype are required).
Value column
Each Valuetype has one value column with a specified format (decimal value, string, date).
Line state
Each line in a value type has a line state (calculated, suggested/imported, and manually entered). A combination of dimension values can only have one non-calculated line and only one line per calculation.
References
References share the same dimension set as the value type they belong to and are always locked for input in apps. One typical use case is to show a historical value for a value type, e.g. a timestamp from end of last month, or the budget for that specific period and account set at an earlier time, etc.