Analytics & Business Intelligence
Dashboards, KPIs, custom report building and forecasting.
5. The Analytics Data Foundation
The Analytics module is backed by a deliberate data foundation rather than live queries against every transactional table. Two database constructs, each added by its own SQL migration, underpin it: materialised views for analytics and a KPI definitions table.
A materialised view is a precomputed, stored result of a query. Instead of recalculating an aggregation every time a dashboard opens, the system can read from the materialised view, which already holds the summarised figures. This is why a summary surface spanning many underlying records can respond quickly — the expensive aggregation has been done ahead of time and persisted.
The KPI definitions table stores the indicators an organisation has created through the KPI Designer. Separating the definition of a KPI from its display means the same stored definition can drive the KPI Board and feed KPI figures shown on the BI Dashboard.
Why the foundation matters
- Materialised views move heavy aggregation out of the request path, improving responsiveness.
- The KPI definitions table makes metrics durable, configurable data rather than hard-coded values.
- Both are introduced by versioned SQL migrations, so the analytics schema evolves with the rest of the database.
This foundation is what connects the module's four visual surfaces to the operational reality of a busy, multi-tenant ERP: the dashboards present, the designer configures, and the materialised views and definitions table do the storing and precomputing that keep the presentation fast and consistent.