A data model describes how data is structured and stored: tables, columns, keys and relationships. A semantic layer sits on top of it and describes what the data means in business terms (customers, orders, net revenue) and generates the SQL to answer questions from those definitions. A semantic model is the set of definitions inside a semantic layer or BI tool. And a semantic data model is an older term for a data model that records meaning as well as structure.
The four terms overlap, which is why teams argue about them. This post separates them with examples.
Side by side
| Data model | Semantic model | Semantic layer | |
|---|---|---|---|
| Describes | How data is stored | What data means | What data means, plus the engine that uses it |
| Contents | Entities, attributes, types, keys, relationships | Entities, dimensions, measures, metrics, joins | A semantic model, a query compiler, interfaces and access rules |
| Audience | Engineers, databases | Analysts, BI tools | BI tools, apps and AI agents |
| Example | fct_order_line joined to dim_customer on customer_key | "Net revenue = sum of line amount minus discounts, excluding refunds" | A service that turns "net revenue by region last quarter" into SQL |
| Typical form | ERD, DDL, dbt models | YAML, LookML, DAX, TMDL | dbt Semantic Layer, Cube, AtScale, offdataai |
The data model: structure
The data model is the foundation. At the conceptual level it names the business entities (Customer, Order, Product). At the logical level it adds attributes, keys and relationships. At the physical level it becomes tables and columns on a specific warehouse, with data types, partitioning and constraints.
Analytics data models are usually Kimball star schemas, Data Vaults or normalised (3NF) models. A good data model already contains a lot of meaning: the grain of each fact table, which keys join, which columns are personal data. What it does not contain is the business logic of metrics. Nothing in fct_order_line says that net revenue excludes refunds.
The semantic model: meaning
A semantic model adds the business vocabulary on top of the tables:
- Entities and how they join (an order belongs to one customer).
- Dimensions to group and filter by (region, product category, order month).
- Measures and metrics with their formulas (net revenue, active customers, churn rate).
- Sometimes hierarchies, synonyms and descriptions for tools and people.
A Power BI semantic model, a set of dbt MetricFlow YAML files and a LookML project are all semantic models. Each is written in its tool's language.
The semantic layer: meaning that answers
A semantic layer is a semantic model plus the machinery to use it: a compiler that turns a request for metrics and dimensions into correct SQL, interfaces (SQL, APIs, MCP for AI agents), and governance such as row-level security and masking. The key benefit is that a dashboard, a spreadsheet and an AI agent asking for "net revenue by region" all get the same number, because none of them writes the SQL by hand.
What is a semantic data model?
The phrase semantic data model dates from the database research of the 1970s and 80s, when it meant a data model that captures the meaning of data and the relationships between real-world entities, not just record layouts. Today it is used loosely for three things:
- A conceptual data model with rich business definitions.
- A semantic model in a BI tool or semantic layer.
- An ontology or knowledge graph model, often in RDF or OWL. See what is a data ontology.
When someone asks for a semantic data model, ask which of the three they mean.
Universal semantic layer vs data model
A universal semantic layer serves every tool from one set of definitions (see what is a universal semantic layer). It does not replace the data model; it depends on it. If the underlying model has mixed grain or unconformed dimensions, the semantic layer will produce wrong answers consistently. The order of work is: a sound data model first, then the semantic layer on top.
Where the line usually sits
A practical rule for deciding where a piece of logic belongs:
- In the data model: anything true of the data regardless of who asks. Keys, grain, history (SCD Type 2), data types, cleaning and conformed dimensions.
- In the semantic layer: anything that is a business definition or policy. Metric formulas, which statuses count as active, fiscal calendars, which users may see which rows.
Logic that sits in neither place ends up copied into every dashboard, which is where conflicting numbers come from.
Frequently asked questions
Is a semantic layer the same as a data model?
No. The data model defines how data is stored; the semantic layer defines what it means and generates queries from those definitions. The semantic layer is built on top of the data model.
What is the difference between a semantic model and a semantic layer?
A semantic model is the set of definitions. A semantic layer is the system that stores them and uses them to answer queries for many consumers. A Power BI semantic model is a semantic model that serves mainly Power BI.
Do I need a data model if I have a semantic layer?
Yes. A semantic layer maps definitions onto tables; if the tables are badly modelled, the answers will be wrong. A clean star schema makes the semantic layer simpler and more reliable.
How do I build a semantic data model?
Start from the business processes and entities, model them as a sound data model, then define metrics, dimensions and their meaning on top. The steps are in how to build a semantic layer.
Data model and semantic layer in one place
offdataai builds both from the same source: the data model comes from an AI interview, a template or a live database, and the semantic layer's concepts, relations and metrics are derived from it for your team to review, so the meaning never drifts from the structure. See the data modeling tool and the semantic layer.
