Search code examples
countdata-warehousefact-table

Warehouse: Store (and count) non-fact records?


How to store records that don't contain any fact? For example, let's say that a shop wants to count how many people have entered inside a store (and that they take info on every person that goes inside the shop). In warehouse, I guess there would be dimension table "Person" with different attributes, but how would fact table look like? Would it contain only foreign keys?


Solution

  • As you described it, that would be just a fact table. Actually, there is name for this -- factless fact table; fact table without any measures.

    It is quite common for recoding events. Essentially anything that records: who, what, where, when and why? would be fact-measure-less table. If you add how much? then that goes into a measure.