Skip to main content
This page documents the Ratings cube database model: the base table, the tables the solution defines, and the joins between them. For the universal common tables, see the common data model. For the column definitions of each table, see Ratings input file formats. The counterparty is the grain of a scorecard, so CounterpartyAttributes is the cube’s base table rather than a joined referential. The Counterparties feature contributes it, and the Ratings customizer enriches it with the scorecard columns. The diagram below shows the tables of the Ratings cube model and the joins between them, labeled with the join fields: the two the Ratings model declares, plus the counterparty structure join contributed by the Counterparties feature. Most tables carry no reference. Only the joins something actually traverses are declared: the metric name is published through Metrics → MetricAttributes, the relationship type name through CounterpartyRelationships → RelationshipTypes, and the counterparty hierarchy through CounterpartyAttributes → CounterpartyStructure. Everything else is reached by many-to-many dimensions or by scorecard-keyed lookups that read the row of the selected Scorecard Date.

What tables are used?

The table below lists all tables used by the Ratings cube. None of them is optional: every one is registered whenever the cube is enabled. Where a table’s extract is absent, the measures that read it simply resolve nothing. An application adds further tables of the same shape, the lookup tables, through IRatingsConfigurer. Each is keyed on EffectiveDate, Scorecard and one more cube level, and carries the fields the application declares. See How to add a lookup table. An application also adds limits tables through IRatingsConfigurer.addLimitsTable. A limits table is keyed on EffectiveDate, or on ReportingDate and CounterpartyId, followed by key fields the application chooses. It publishes no measure: a limit bound reads it with LimitsLookup. See How to declare a limits table.

How are the tables joined?

The three join names are CounterpartyStructure, MetricsToMetricAttributes and RelationshipTypes. IRatingsDatabaseModel publishes them as metricsToMetricAttributesJoin(), counterpartyRelationshipsToRelationshipTypesJoin() and counterpartiesTables().counterpartyAttributesToStructureJoin(), so application code can build a field path without hard-coding the string.

How are the other tables reached?

The counterparty structure is the only table joined to the base table. The cube reaches the rest in two ways:
  • Many-to-many dimensions. CounterpartyRelationships and MetricValues are published as many-to-many dimensions. CounterpartyRelationships maps onto the AsOfDate and Counterparty ID levels, and MetricValues onto the Counterparty ID and Metric ID levels. Aggregating across relationship types therefore multi-counts by design: the dimension is a classification for slicing, not an additive axis.
  • Scorecard-keyed lookups. The configuration tables (Categories, Metrics, PeriodAttributes and every lookup table) are versioned by an effective date. A measure reads the row keyed by the selected Scorecard Date and the counterparty’s scorecard. The EFFECTIVE limits tables are also versioned by an effective date, but a measure reads them by the selected Scorecard Date and their own key fields, such as RelationshipTypeId, not by the counterparty’s scorecard.

How to customize the data model

Customizing the data model (adding fields, adding new tables) is common to all Atoti solutions. See the common documentation on customizing the data model.