# Star schema

> A data warehouse layout: one table of events in the middle, descriptive tables around it.

- Level: Advanced
- Topics: Data
- URL: https://tidbit.legios.com.ar/star-schema/
- In Spanish: [Esquema en estrella](https://tidbit.legios.com.ar/es/star-schema/)

A **star schema** is the most common way to organize tables in a data warehouse for analysis. In the center sits a **fact table**: one row per event you want to measure, such as each sale, with numbers like quantity and amount plus keys pointing outward. Around it sit **dimension tables** that describe the context of those events: date, product, store, customer. Drawn on a whiteboard, the center and its spokes look like a star.

The design matches how people ask business questions: "sales amount (the fact) by month and region (the dimensions)". A query joins the fact table to the dimensions it needs, filters and groups, and that is all. BI tools like Power BI are built around this shape, and it is the core of **dimensional modeling**, the method popularized by Ralph Kimball in the 1990s.

Unlike a normalized transactional database, a star schema deliberately repeats data in the dimensions, for example storing category and brand right on each product row, to keep joins few and shallow. Fact tables can grow to billions of rows while dimensions stay comparatively small. When dimensions are themselves split into further normalized tables, the result is called a **snowflake schema**, which saves space but adds joins.

## An analogy

Like a sales receipt pinned in the middle of a corkboard, with strings running to cards that explain it: the calendar for when, the product catalog for what, the store list for where, the customer file for who.

## Keep in mind

- Fact table in the center: measurable events like sales, with numbers and keys.
- Dimension tables around it: who, what, where, when.
- Repeats data in dimensions on purpose to keep queries simple and fast.
- The standard layout behind most data warehouses and BI models.

## Go deeper

- [Understand star schema (Microsoft Power BI docs)](https://learn.microsoft.com/en-us/power-bi/guidance/star-schema)
- [Star schema on Wikipedia](https://en.wikipedia.org/wiki/Star_schema)

## Related terms

- [Data warehouse](https://tidbit.legios.com.ar/data-warehouse/): A database built for analysis: years of history, from many sources, in one place.
- [Regions and Availability Zones](https://tidbit.legios.com.ar/regions-and-availability-zones/): Where AWS physically lives: cities worldwide, each split into separate data centers.
- [Business intelligence](https://tidbit.legios.com.ar/business-intelligence/): Turning a company's data into reports and dashboards people use to decide.
- [Power BI](https://tidbit.legios.com.ar/power-bi/): Microsoft's tool for turning company data into interactive charts and reports.
- [Database](https://tidbit.legios.com.ar/database/): An organized store of data that programs can search and update safely.
- [Database normalization](https://tidbit.legios.com.ar/database-normalization/): Organizing tables so each fact is stored in exactly one place.
