Back to all posts

What is Data tables(Fact Tables) vs Lookup tables(Dimension Tables)

Data Tables(Fact Tables) Purpose : Store detailed, raw data. Structure : Multiple columns (attributes) and rows (records). Example : A table with order det…

Data Tables(Fact Tables)

  • Purpose: Store detailed, raw data.
  • Structure: Multiple columns (attributes) and rows (records).
  • Example: A table with order details (order ID, customer ID, product ID, quantity, price, date).

Lookup Tables(Dimension Tables)

  • Purpose: Map or reference specific values to ensure consistency.
  • Structure: Key-value pairs (usually fewer columns).
  • Example: A table translating product IDs to product names (product ID, product name).

Key Differences

AspectData TablesLookup Tables
UseStore raw data for analysisReference and standardize values
DataDetailed and comprehensiveSimplified and static
ExampleOrder detailsProduct names

In summary:

  • Data tables contain all the detailed information you need for analysis.
  • Lookup tables help you translate or look up specific values to keep your data consistent.

Keep building your data skillset

Explore more SQL, Python, analytics, and engineering tutorials.