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:

student_idcourse_idsemester_id

1

101

202201

2

102

202201

3

101

202201

3

103

202201

4

104

202201

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.

Last updated