Skip to main content
What is a Fact Table?
  1. Glossary/

What is a Fact Table?

6 mins·
Ben Schmidt
Author
I am going to help you build the impossible.

In the early days of building a company, you probably track everything in a simple spreadsheet. You have a list of customers, a list of orders, and maybe a list of marketing spends. As you grow, that spreadsheet becomes a liability. You eventually move toward a data warehouse to handle the complexity. Within that warehouse, you will find a structure called a star schema. At the center of that star is the fact table.

A fact table is a specific type of table in a database that stores the quantitative information for a business process. Think of it as a ledger that records every time a specific event occurs. If you run an e-commerce store, a fact table might record every individual sale. If you run a social media platform, it might record every time a user clicks a button. It is the primary place where the numbers live.

This table is designed to be narrow and very long. It does not usually contain names or descriptions. Instead, it contains numbers, which we call measures, and keys that point to other tables. It exists to provide the raw data needed to calculate your key performance indicators. Without a properly structured fact table, your ability to scale your data analysis will hit a ceiling quickly.

Understanding the Components of a Fact Table

#

To understand how these tables work in a real startup environment, you have to look at what is inside them. Every row in a fact table represents a single event. This event is often called a grain. Deciding on the grain is one of the most important decisions a founder or a data engineer can make. If the grain is too coarse, you lose detail. If it is too fine, your database might become slow and expensive to manage.

Most fact tables contain two types of columns. The first type is the foreign key. These keys are unique identifiers that link the fact table to dimension tables. For example, a sale record will have a product key, a customer key, and a date key. These keys do not tell you the name of the product or the address of the customer. They simply act as a map to find that information elsewhere.

The second type of column contains the measures. These are the actual numbers you want to analyze. Common measures include the price of an item, the quantity sold, or the duration of a user session. These are almost always numerical. Because they are numbers, the database can add, average, or count them very quickly. This speed is what allows you to generate reports across millions of rows of data in seconds.

The Role of Quantitative Measures in Growth

#

For a founder, the fact table is the source of truth for the health of the business. It allows you to move away from gut feelings and toward evidence based decisions. When you ask a question like what was our total revenue last month, the system looks at the fact table. It sums up all the revenue measures for every row that has a date key within that month.

This structure is intentionally redundant in terms of rows but efficient in terms of storage. In a startup, your data will grow faster than you expect. You might start with a few hundred transactions, but that can quickly turn into millions. Fact tables are built to handle this volume. They are optimized for read heavy workloads, meaning they are designed to be queried over and over again for different reports.

We also see fact tables used to track unit economics. By looking at the costs and revenues associated with specific events in the fact table, you can determine if your business model is actually sustainable. It provides a level of granular detail that a simple profit and loss statement cannot provide. You can see which specific products or user behaviors are driving the most value.

Fact Tables vs Dimension Tables

#

A common point of confusion for new founders is the difference between fact tables and dimension tables. It is helpful to think of this in terms of language. Fact tables are the verbs of your business. They represent actions like bought, clicked, or shipped. Dimension tables are the nouns. They represent the people, places, and things involved in those actions.

A dimension table contains descriptive attributes. For a customer, this would be their name, email, city, and signup date. This data is usually textual and changes infrequently. A fact table, on the other hand, is constantly growing as new events occur. It is the record of activity.

If you put all the descriptive data into the fact table, the table would become massive and slow. By separating the facts from the dimensions, you keep the fact table lean. This separation is what creates the star schema. The fact table sits in the middle, and the dimension tables surround it like the points of a star. This organization makes it much easier for your team to write queries and build dashboards.

Practical Scenarios for Founders

#

Let us look at a few scenarios where you would use a fact table. In a subscription software business, you might have a fact table for monthly recurring revenue. Every month, a new row is added for every active subscription. This allows you to track growth, churn, and expansion over time. You can easily calculate your lifetime value because all the raw financial events are stored in one place.

In a logistics or hardware startup, you might use a fact table to track sensor data or shipping milestones. Each time a package moves to a new location, a row is added. This allows you to analyze bottlenecks in your supply chain. You can ask which routes are the slowest and get a statistically accurate answer because you are looking at the total population of events.

Even in marketing, fact tables are essential. You might have a table that records every impression or click on an ad. By joining this with your sales fact table, you can see the direct path from a marketing spend to a finished sale. This level of visibility is what separates professional operations from those that are just guessing.

The Unknowns of Data Modeling

#

While the concept of a fact table is straightforward, there are many things we still do not fully understand about the best ways to implement them in rapidly changing environments. Startups pivot often. When your business model changes, your fact tables often need to change as well. How do you maintain historical accuracy when the definition of a sale or a user changes? This is a question many data teams struggle with.

There is also the question of real time data. Traditionally, fact tables are updated in batches, perhaps once a day. In the modern world, many founders want to see data as it happens. Creating fact tables that can handle constant, high speed updates while still being available for complex queries is a significant technical challenge.

You should also consider the human element of data. A fact table is only as good as the data being fed into it. If your software engineers change how a button click is recorded without telling the data team, your fact table becomes inaccurate. We must ask ourselves how we can build better communication loops to ensure the data we rely on remains a true reflection of reality. Understanding the limitations of your fact table is just as important as understanding its structure.