Data Modeling for Analytics

The same data can be organized in ways that make analytical queries fast, intuitive, and cheap — or slow, confusing, and expensive. Data modeling is the craft of that organization, and it's where a counterintuitive truth lives: the careful normalization that's correct for application databases is often exactly wrong for analytics. Analytical data wants to be shaped differently, around how questions are asked rather than how data is written, and understanding dimensional modeling is understanding how to make a warehouse actually usable.

Data modeling is how data is organized and structured for its use — and modeling for analytics differs from modeling for applications. This post covers what data modeling is, the normalization-vs-denormalization tradeoff (and why analytics leans denormalized), dimensional modeling and the star schema, and why modeling matters. It builds on the storage post (modeling organizes data within warehouses) and is where raw data becomes usefully structured data for analytics.

What data modeling is

Data modeling is designing how data is organized and structured — what tables/entities exist, their fields, and how they relate — for the intended use. It shapes how usable, performant, and understandable the data is:

Data modeling is designing how data is organized and structured for its intended use, determining usability, performance, and clarity — and modeling for analytics (OLAP) differs from modeling for applications (OLTP). The key analytical-modeling tradeoff is normalization vs denormalization.

Normalization vs denormalization

A central modeling tradeoff is normalization vs denormalization — and analytics leans the opposite way from application databases, which surprises many engineers:

The normalization (minimize redundancy — good for OLTP consistency and writes) vs denormalization (duplicate/combine to reduce joins — good for OLAP query performance) tradeoff flips for analytics: analytics leans denormalized because it prioritizes read/query performance over write efficiency, and controlled duplication is acceptable. This surprises engineers trained on normalization, and it underlies dimensional modeling.

Dimensional modeling and the star schema

The dominant analytical modeling approach is dimensional modeling, whose signature is the star schema — a denormalized structure designed for analytical queries:

   Star schema:
                 [Dim: Date]
                     |
   [Dim: Product]—[FACT: Sales]—[Dim: Customer]
                     |
                 [Dim: Store]
   central fact table (measures) surrounded by dimension tables (context)

Dimensional modeling — organizing data into facts (measures/events) and dimensions (descriptive context), arranged as a star schema (central fact table surrounded by dimension tables) — is the dominant analytical modeling approach, denormalized for query performance and structured around how analytical questions are asked. It’s how analytical data is typically modeled. This modeling matters a great deal.

Why modeling matters

Data modeling is often underappreciated but critically important — worth making explicit:

Data modeling — organizing data for its use, denormalized and dimensional (facts/dimensions, star schema) for analytics — is how raw data becomes usefully structured, and it critically determines whether analytics is usable, performant, and cost-effective. It’s a high-leverage, foundational, business-aware design decision that surprises engineers by flipping OLTP normalization. Next: batch vs streaming — the two paradigms for processing data.

Key takeaways

Further reading

Sources & References

Modeling for use
Dimensional modeling