# Grain

> What one row of a table stands for, such as one sale or one day.

**Field:** Data Engineering  
**Category:** Storage & Warehousing  
**Also known as:** Fact Table Grain, Table Grain, Granularity

## Think of it like

It is like slicing bread. Thin slices can be stacked up, but a thick slice cannot be made thin again.

## Definition

The grain of a table says what one row stands for. One row per receipt and one row per item on a receipt are two different grains. The grain is chosen first, before any columns. Every number in the table must match it. A finer grain means more rows, but more questions can be answered.

## Example

A table with one row per receipt can say how much each visit spent. Only a table with one row per item can say which product sold.

## Why it matters

A wrong grain gives wrong totals. Mixing two grains in one table counts some sales twice.

## Common mistake

Never writing the grain down. Then someone adds daily totals to a table of single sales, and the sums come out too big.

## Three principles

- **Decide it first.** Pick the grain before the columns.
- **One per table.** Never mix two grains.
- **Finer answers more.** Rows can be summed, not split.

## Related terms

- [Fact Table](https://learn.benibix.com/term/data/fact-table)
- [Dimensional Modeling](https://learn.benibix.com/term/data/dimensional-modeling)
- [Dimension Table](https://learn.benibix.com/term/data/dimension-table)
- [Star Schema](https://learn.benibix.com/term/data/star-schema)
- [Measure (Analytics)](https://learn.benibix.com/term/data/measure)
- [One Big Table (OBT)](https://learn.benibix.com/term/data/one-big-table)

![Two tables of the same sales. Left, one row per receipt: R-101 with 3 items for $18 and R-102 with 1 item for $4. It answers how much per visit but not which product sold. Right, highlighted, one row per item: bread, cheese and milk on R-101 and bread on R-102. It answers both and still adds up to $22. A note says pick the finest grain you will need, because rows can be added up later but never split.](https://learn.benibix.com/diagrams/dat-grain.svg)

---

Source: https://learn.benibix.com/term/data/grain
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
