> For the complete documentation index, see [llms.txt](https://gchandra.gitbook.io/data-warehousing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gchandra.gitbook.io/data-warehousing/data-warehousing-concepts/types-of-facts/factless-fact-table.md).

# Factless Fact Table

Ideally, Fact tables should contain some Measurements. What if there is nothing to measure?

A factless fact table is a type of fact table in a data warehouse that contains only foreign keys and no measures. It represents a many-to-many relationship between dimensions without any associated numerical measures.

Here is an example of a factless fact table for a university enrollment system:

<table><thead><tr><th>student_id</th><th width="226.33333333333331">course_id</th><th>semester_id</th></tr></thead><tbody><tr><td>1</td><td>101</td><td>202201</td></tr><tr><td>2</td><td>102</td><td>202201</td></tr><tr><td>3</td><td>101</td><td>202201</td></tr><tr><td>3</td><td>103</td><td>202201</td></tr><tr><td>4</td><td>104</td><td>202201</td></tr></tbody></table>

In this example, the fact table captures the enrollment of students in courses for a particular semester. It contains only foreign keys to the student, course, and semester dimensions and does not contain any measures such as enrollment count or grade.

This type of fact table is useful in scenarios where we need to analyze the relationships between dimensions without any numerical measures. For example, we might use this factless fact table to answer questions such as:

* Which students are enrolled in more than one course in a semester?
* Which courses have no students enrolled in a semester?
* Which students have not enrolled in any courses in a semester?
* Which courses are only offered in one semester?

By analyzing the relationships between dimensions in this way, we can gain insights into the behavior and patterns of our data without relying on numerical measures.

**Good use case for building Aggregate Fact Tables.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gchandra.gitbook.io/data-warehousing/data-warehousing-concepts/types-of-facts/factless-fact-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
