Data modeling is the work of deciding which tables your analytics data lives in, what one row of each table stands for and how the tables connect. For an ecommerce brand, the raw material is spread across ad platforms, the store, the email tool and web analytics, and each source describes the same customer, campaign or day in its own way. A data model turns those sources into one set of tables that reports, dashboards and AI tools can trust. This answer explains dimensional modeling, the approach we use for marketing data, with the fact and dimension tables we typically build, as of 26 November 2026.

What is dimensional modeling?

Dimensional modeling splits data into two kinds of table. Microsoft's Power BI guidance describes star schema as an approach that "requires modelers to classify their model tables as either" dimension or fact. Fact tables hold events and measurements, such as an order, a click or a day of spend. Dimension tables hold the context used to filter and group those events, such as the date, the channel, the product or the customer.

The Kimball Group's dimensional modeling techniques put the purpose of a fact table plainly: "Thus a fact table corresponds to a physical observable event, and not to the demands of a particular report." In our view, that sentence is the most useful rule in marketing data work. A table built for one dashboard breaks the moment someone asks a new question. A table built around a real event, such as an order line, keeps answering new questions.

Start with the grain

The grain is what one row of a fact table stands for. Kimball's guidance is that "The grain must be declared before choosing dimensions or facts because every candidate dimension or fact must be consistent with the grain." It also says "Each proposed fact table grain results in a separate physical table". Microsoft's guidance makes the same point for BI models: "It's also important that fact tables always load data at a consistent grain."

Marketing data breaks this rule more often than any other kind of data we work with. Ad platforms report spend per campaign, ad set or ad per day. Stores record orders per order line. Web analytics records sessions and events. Putting campaign spend on order rows, or order revenue on daily spend rows, double counts one side or the other as soon as someone sums a column.

The fact and dimension tables we usually build

The table below is our typical starting design for a direct-to-consumer brand. It is our own recommendation, not a standard, and the exact tables depend on the sources a brand uses.

A typical marketing star schema for an ecommerce brand (Brand Media Works design, November 2026).
TableTypeOne row isJoins to
Ad spendFactOne ad on one platform on one dayDate, channel, campaign
Order linesFactOne product on one orderDate, customer, product, channel
SessionsFactOne website visitDate, channel, campaign, customer where known
Email and SMS sendsFactOne message to one recipientDate, campaign, customer
DateDimensionOne calendar dayEvery fact table
ChannelDimensionOne channel grouping, such as paid social or organic searchAd spend, order lines, sessions
CampaignDimensionOne campaign as named on its platformAd spend, sessions, sends
ProductDimensionOne product or variantOrder lines
CustomerDimensionOne customer, or one version of a customer if history is trackedOrder lines, sessions, sends

Microsoft's guidance notes that "The most consistent table you'll find in a star schema is a date dimension table." That holds for marketing too. A single date table, with fiscal weeks, promotions and holidays added once, saves every analyst from rebuilding the calendar in each report.

Why shared dimensions matter for marketing

The hardest marketing question is usually how spend relates to revenue, and the two come from different systems at different grains. Kimball calls the fix conformed dimensions: "Information from separate fact tables can be combined in a single report by using conformed dimension attributes that are associated with each fact table." In practice, the ad spend table and the order lines table both join to the same date and channel tables. A report can then put spend and revenue by channel and week side by side, even though no single table holds both.

The channel table is where most of the judgment sits. Mapping UTM parameters and click IDs to a clean channel list once, in one table, is far easier to maintain than repeating the mapping in every dashboard. Our guide to UTM parameters and click IDs covers the inputs.

Star schema or snowflake schema?

A star schema keeps each dimension in one wide table. A snowflake schema splits dimensions into several related tables, such as product, subcategory and category. A post on the dbt Labs developer blog explains the trade-off: a snowflake design "results in many joins that need to be performed by the consumer of the dimensional model", while a star schema "reduces the amount of joins that need to be performed by the consumer of the dimensional model."

Microsoft's Fabric documentation adds that "A well-designed star schema delivers high performance (relational) queries because of fewer table joins, and the higher likelihood of useful indexes." For marketing reporting, where most users work in a BI tool such as Data Studio (formerly Looker Studio), Power BI or Tableau, we build star schemas unless a dimension is very large and changes often.

Handling changes over time

Customers move between segments, products change category and campaigns get renamed. A slowly changing dimension decides what happens to history when that happens. The two common choices are to overwrite the old value, so every past order shows the current segment, or to keep each version as a new row. Kimball describes the second approach, type 2, and says "A minimum of three additional columns should be added to the dimension row with type 2 changes", namely an effective date, an expiration date and a current-row flag.

In our view, the customer dimension is the one to get right first. If a report asks what share of revenue came from VIP customers last spring, it usually means customers who were VIP at the time, which needs type 2 history. Our guide to customer segmentation covers how those segments are built.

Where the model sits in the wider stack

A dimensional model is usually the last, cleanest layer of a warehouse. In a medallion architecture, it is the gold layer that reports read from. A semantic layer then sits on top and defines metrics such as revenue or conversion rate once, so every tool calculates them the same way. Kimball notes that "Dimensional modeling best practices are architecture-neutral", so the same design works on any warehouse.

Mistakes we see most often

  • Mixed grains. Order totals stored on order-line rows, or spend stored on order rows. Every sum over that table is wrong.
  • Report-shaped tables. One table per dashboard, each with its own copy of the channel logic, drifting apart over time.
  • No customer key across sources. Sessions, sends and orders that cannot be tied to the same person. Identity resolution covers how that key is built.
  • History overwritten by accident. A customer segment updated in place, which quietly rewrites last year's reports.

Frequently asked questions

What is data modeling in a data warehouse?

It is the design of the tables that analysts and tools query: what each table holds, what one row stands for and how tables join. In a dimensional model, those are fact tables for events and dimension tables for context.

What is the difference between a fact table and a dimension table?

A fact table records events and their numbers, such as an order line with its quantity and price. A dimension table describes the things in those events, such as the product or the customer. Microsoft's guidance sums it up this way: dimension tables enable filtering and grouping, and fact tables enable summarization.

Do I need dbt to build a dimensional model?

No. A dimensional model is a design, and it can be built with SQL in any warehouse. Transformation tools such as dbt make the SQL easier to test, document and run on a schedule, which is why we often use one.

How many fact tables does an ecommerce brand need?

Usually three to five to start: ad spend, order lines, sessions, and often email and SMS sends or subscriptions. Add more only when a new business process needs its own grain.

Book a discovery call