liveBook · Manning

Fact table

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

An event table stores records of business events measured at particular moments.

A fact table, also called an event or transaction table, records specific business events measured at particular moments. It provides the event-level foundation for analysis. section 2.3.1

Fact tables commonly sit within a normalized data warehouse alongside item tables, which describe products or event details, and dimension tables, which add descriptive context such as location or category. section 2.3.1

Typical fact-table events include:

SELECT df1.product_id, df1.product_name, df1.price, 
df2.product_description, df2.category, df3.manufacturer, df3.weight
FROM df1
JOIN df2 ON df1.product_id = df2.product_id
JOIN df3 ON df1.product_id = df3.product_id;

Use joins to assemble event records with product attributes distributed across related tables. section 2.3.1

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Defines the table type and contrasts related tables, but stops short of schema design or detailed implementation.
Examples
Uses e-commerce orders, banking transactions, healthcare visits, and internet clickstreams as event examples.
What it assumes
Assumes familiarity with tabular data while defining normalized schemas and related table roles.
What you can do after
Apply the concept by identifying event records and assembling them with related tables for analysis.
How it connects
Connects fact tables with normalized schemas, item tables, dimension tables, data warehouses, and table joins.

Also explained in

Compare how 2 books explain fact table →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.