Search code examples
database-designssasdata-modelingdata-warehouse

What dw model is appropriate when there's no measure?


All the demos out there use a sales/order model as a measure in their examples. But my db is not transactional. It's a customer-centric model where there is one table for the customer which is joined to several attribute tables.

Does this not even qualify for cube building because of the different model, or is there some way to still build cubes despite it not being transactional?

I've heard of factless fact tables but don't really understand the concept yet. Is this where you would use one?


Solution

  • What kind of metrics are you going to analyze?

    If all you want to do is aggregate the number of customers that have a particular attribute, you could get away with a fact table like this:

    Customer_FK, Attribute_FK
    

    I prefer using an extra column with a fixed value of "1" to make aggregation simpler

    Customer_FK, Attribute_FK, Attribute_count
        1000,      23,             1
        1001,      23,             1
    

    This way you can use a simple sum aggregation on the third column to find out that you have 2 customers with attribute #23.

    I am assuming you would use a single (flat) attribute dimension table and populate it with the several attribute tables from your customer-centric db.

    http://www.kimballgroup.com/1996/09/02/factless-fact-tables/