Glossary Entry

What is a Star Schema?

A star schema is a dimensional model with a central fact table joined to denormalized dimension tables. Learn Kimball basics and why it simplifies analytic SQL.

Written by Alex Merced

What is a Star Schema?

A Star Schema is the core structure of dimensional data modeling. Popularized by Ralph Kimball in the 1990s, the Star Schema is a design pattern used to organize data within a Data Warehouse or the Gold layer of a Data Lakehouse.

Operational databases (like PostgreSQL) typically use normalized schemas (like the Third Normal Form). Normalization reduces data redundancy, which makes inserts and updates of individual records simple and efficient. However, normalization forces analysts to write SQL queries with many JOIN statements to generate a simple report, which is harder to write and can be slower to run.

The Star Schema denormalizes the data. It optimizes for fast reads and simple SQL by dividing the model into two types of tables: Fact tables and Dimension tables.

The Architecture of the Star

The design is called a “Star Schema” because the entity relationship diagram resembles a star. A large Fact table sits in the center, surrounded by multiple smaller Dimension tables radiating outward like points on a star.

1. The Fact Table (The Center)

The Fact table records the quantitative, measurable events of the business. Each row in a Fact table represents a specific business transaction or event, such as a customer purchasing an item, a sensor recording a temperature, or an ad being clicked.

Fact tables are usually narrow but very long (sometimes containing billions of rows). They consist almost entirely of two things:

  • Foreign Keys: Integer IDs that link back to the surrounding Dimension tables (e.g., customer_id, store_id, date_id).
  • Measures: The actual numerical metrics being recorded (e.g., purchase_amount_usd, quantity_sold, discount_applied).

2. The Dimension Tables (The Points)

The Dimension tables provide the descriptive context to the raw numbers in the Fact table. They answer the “Who, What, Where, When, and Why” of the transaction.

A Customers Dimension table contains the customer’s name, email, age, and geographical region. A Products Dimension table contains the product name, brand, category, and supplier. Dimension tables are wide (containing dozens of descriptive string columns) but relatively short (often thousands or millions of rows, not billions).

Why the Star Schema Excels at Analytics

The Star Schema remains a standard approach for analytical reporting for three main reasons:

1. Simpler Queries

Because the data is denormalized into distinct dimensions, business analysts no longer need multi-level joins across many operational tables. To find the “Total Revenue of Nike shoes sold in California in Q3”, the analyst writes a simple query joining the central Sales_Fact table directly to the Location_Dim, Product_Dim, and Date_Dim tables. The SQL is readable, easy to debug, and simple for Business Intelligence (BI) tools (like Tableau) to generate automatically.

2. High-Speed Query Optimization

Modern columnar engines (like Snowflake or Trino) handle Star Schema queries efficiently. They often use the Broadcast Hash Join: because Dimension tables are relatively small, the query engine can send a copy of the Location dimension to the memory of every worker node in the cluster. The worker nodes then scan the large, distributed Fact table in parallel and join the data in memory without shuffling the fact rows across the network.

3. Conformed Dimensions

In a large enterprise, different departments track different facts. Sales tracks revenue; Logistics tracks shipments. In a proper Star Schema architecture, both the Sales_Fact table and the Shipping_Fact table join to the same, shared Date_Dim and Product_Dim tables. These are known as Conformed Dimensions. Because both departments filter their facts using the same dimension tables, their reports group and label data the same way, which keeps cross-department numbers consistent.

Summary of Technical Value

The Star Schema is a modeling layer that turns complex operational data into understandable business intelligence. By separating quantitative business events (Facts) from descriptive context (Dimensions), the Star Schema allows cloud data warehouses and modern lakehouses to execute large analytical aggregations efficiently, and it makes large datasets easier for non-technical business analysts to explore.

Learn More

To learn more about the Data Lakehouse, read The Lakehouse Built for Everyone by Alex Merced. You can find this and other books by Alex Merced at books.alexmerced.com.

Work with Alex