Skip to content
BENIBIX Learn

Fact Table

Data🗄️ Storage & WarehousingDimensional Modeling

The table of events you count, such as sales. It holds numbers and keys.

Think of it like

It is like a pile of till receipts. Each one is a sale, with an amount and a few codes.

Example

Each row of fact_sales has a date key, a shop key, a product key, a quantity and an amount. It grows by a million rows a day.

Why it matters

Most business numbers are sums over a fact table. How it is built sets what you can ask.

Definition

A fact table holds the events a business measures. Each row is one event, such as one sale or one click. It stores numbers, such as amount and quantity. It also stores keys that point to dimension tables, such as the date and the product. Fact tables are long and thin, and often the biggest tables in a warehouse.
A star keeps each dimension in one table. A snowflake splits some of them again.

Common mistake

Not stating the grain. If no one knows whether one row is a sale or a sale line, totals come out wrong.

Key takeaways

  1. 1
    One row, one event. Each row is something that happened.
  2. 2
    Numbers to add. Amounts and counts live here.
  3. 3
    Keys to describe. Keys point to dimension tables.

Compare