Skip to content

0. Star Schema

Andreas Riehl edited this page Nov 5, 2025 · 15 revisions

The star or snowflake schema is the analytical model that will be consumed in analytical queries. Therefore we introduce all the related development artifacts in this chapter (0), before we use the model in the different analytical queries in the following chapters (1++).

Cube View

The cube is the heart of our analytical model. It draws together all required measures & dimensions and defines the functionality of the analytical model. The cube view is a view entity with the header annotation @Analytics.dataCategory: #CUBE. Example: /DMO/ANA_I_FlightCube.

Dimension Views

The dimension fields in the cube view are just IDs (e.g. airline ID). Additional attributes (e.g. the name and city of the airline) come from the dimension views. A dimension view is a view entity with the header annotation @Analytics.dataCategory: #DIMENSION. It is referenced at the dimension field in the cube view using the @ObjectModel.foreignKey.association annotation. Examples are: The city dimension view /DMO/ANA_I_City, the connection dimension view /DMO/ANA_I_Connection, the airport dimension view /DMO/ANA_I_Airport and the carrier (or airline) dimension view /DMO/ANA_I_Carrier.

Hierarchies

A hierarchy consists of several different artifacts which are:

  1. The hierarchy directory view is used as a directory for different variants of a hierarchy. In our example /DMO/ANA_I_AirportHierDir, the directory contains 2 variants and their header information like ID and Text. The first one groups the airports geographically (world, region, country, airport), the second one alphabetically (by groups of letters in the alphabet like in an address book).
  2. The hierarchy base view (sometimes referred to as hierarchy source view or just hierarchy view) defines the hierarchy by (mainly) defining the parent child relationship via a self association, associating the hierarchy directory view and by associating the needed dimension and text views. Our example is /DMO/ANA_P_AirportHierBase.
  3. The hierarchy definition constitutes the hierarchy. It uses the base view as a source and puts its elements in a semantic relation. Example: /DMO/ANA_I_AirportHier.
  4. The hierarchy node view lists all hierarchy nodes that are used in the different hierarchy variants. It is used in the base view to define the node type (optional). Example: /DMO/ANA_I_AirportHierNode. Finally, the hierarchy is used in a dimension view. The hierarchy in our example is used in the /DMO/ANA_I_Airport dimension.

Text Views

Text views are marked by the annotation @objectModel.dataCategory: #TEXT and provide language-dependent texts for the dimension fields. They are connected to the dimension fields via text associations using the annotation @ObjectModel.text.association.

Clone this wiki locally