A data model describes which data a system contains and how it fits together. It records, for example, which customers, orders, products and invoices you register, which attributes they have and how they are linked.
A good data model helps you build reliable reports and give AI agents the right context. It makes clear, for example, how to avoid counting a sale twice or how to link a cost to the right project.
In this article you will read which types of data models exist, what a star schema is and how Qlik's associative model works. This article is part of our guide AI agents in your business: how to get your data ready.
A simple example
Take a wholesaler. In the ERP you find, among others, these objects and relationships:
| Object | Key attributes | Related to |
|---|---|---|
| Customer | name, VAT number, sector, region | has orders |
| Order | date, customer, sales rep | has order lines, leads to deliveries |
| Order line | product, quantity, price, discount | belongs to an order and a product |
| Delivery | date, carrier | belongs to one or more order lines |
| Invoice | date, amount, due date | invoices one or more deliveries |
| Product | category, cost price, supplier | appears in order lines |
That seems obvious. But what if an order ships in two deliveries and is billed in one invoice? Or if a credit note refers to an invoice and not to an order?
The data model describes the relationships you need to take those situations into account. Together with clear calculation agreements, that helps you avoid counting the same sale twice and include credit notes correctly.
Why a data model matters
- Correct totals. Clear relationships and calculation agreements help avoid double counting.
- Consistent answers. A shared model and shared definitions help teams calculate the same figures in the same way.
- Speed. A model built for analysis can speed up reporting compared with analysing ERP tables directly. The result depends on the data and the technical set-up.
- Reliable AI. A clear model gives an AI agent context about data and relationships. Data quality and the available definitions also remain important.
Conceptual, logical and physical data model
A data model can describe at different levels which data you need and how it fits together.
| Type | What it describes | For whom | Example |
|---|---|---|---|
| Conceptual | The main concepts and how they relate, without technical details | Management and business | A customer places orders; an order contains products |
| Logical | Objects, attributes and relationships, independent of the technology | Analysts | An order has an order number, date and customer ID; one customer has zero or more orders |
| Physical | How the model is built in a database: tables, columns, keys and data types | Developers | A table orders with a column customer_id as foreign key |
You also often hear functional data model and technical data model. These terms are not used the same way everywhere. Usually the functional model describes the data in the language of the business, while the technical model shows how the data is set up technically.
Want to see what such models look like in practice? The University of Illinois shares examples of logical and physical data models, including a financial model.
Canonical data model
A canonical data model is a common format into which you translate data from different systems.
Your ERP calls a customer a “debtor”, for example, your CRM uses “account” and your accounting speaks of a “relation”. In the canonical model you agree on what those terms mean and which attributes you use for a customer. That makes it easier to exchange and combine data between systems.
Those agreements are therefore not only about names, but also about meaning and structure. Digitaal Vlaanderen explains how data standards help describe data in a common way (in Dutch).
More on combining systems in connecting ERP, CRM and accounting into one data layer.
The star schema: facts and dimensions
For analysis you often use a star schema. It consists of two kinds of tables:
- A fact table contains the events you measure, such as sales lines with date, quantity, revenue and cost price.
- Dimension tables contain the angles from which you look at those facts, such as customer, product, sales rep, date and region.
The fact table sits in the middle with the dimensions around it: hence the name. A question such as “revenue per product category per region in the third quarter” combines sales data with the product, region and date dimensions, for example.
When dimensions are themselves split further, for example product → category → main category, you speak of a snowflake schema.
A star schema is a widely used way to structure data in a data warehouse for analysis. What a data warehouse is and whether an SME needs one is covered in what is a data warehouse?
Example of a data model for an SME
| Fact table | Measures | Dimensions |
|---|---|---|
| Sales lines | revenue, quantity, cost price, margin | customer, product, sales rep, date |
| Purchase lines | purchase amount, quantity | supplier, product, date |
| General ledger entries | amount | general ledger account, cost centre, date |
| Hours | number of hours, cost | employee, project, activity, date |
Qlik's associative data model
Qlik Sense, the platform InsightData works on, uses an associative data model. Tables are loaded into memory and linked to each other through shared fields.
When you select a customer, you see which products, sales reps and periods relate to that customer. Qlik also shows which values that selection excludes.
This lets you explore, for example, which products a certain customer did not buy. Whether you find customers who bought nothing this year depends, among other things, on which customers and sales data are included in the model. Qlik explains how selected, possible and excluded values work.
A more detailed comparison with Tableau's relational approach is in Qlik Sense vs Tableau.
From data model to semantic data model
A data model records how data fits together. That does not necessarily record the business definitions of terms such as “revenue” or “gross margin”.
You can record those agreements in a semantic data model: a layer that gives data a clear business meaning and shared definitions. Dashboards and AI agents can then use those definitions to answer questions more consistently.
Read on in semantic data model: one version of the truth for your KPIs.
Frequently asked questions
What is the difference between a database and a data model?
A database is a system in which data is stored and managed. The data model is the design: it describes which data exists and how it fits together. The physical data model describes how that design is built in a database.
Who creates the data model?
Usually a data analyst or BI partner creates the data model together with the people who know the business processes. Input from finance, sales and operations helps make the relationships and definitions match business reality.
Further reading
- AI agents in your business: how to get your data ready
- Connecting ERP, CRM and accounting into one data layer
- Semantic data model
- What is a data warehouse?
- Qlik Sense vs Tableau
Want a data model that is already built for your ERP? InsightData builds on Qlik Sense and provides ready-made data models per domain, as a Qlik partner in Belgium.
