I have a case where I'm building factless fact table for my DWH. There are 2 dimension that I want to ask for this case: location and store. I have 2 approach.
Building dim_store and fact_account. Then put all the location data into the fact_account table
Building dim_store, dim_location, and fact_account. Then put the store_id and location_id on the fact_account
Here is the visualization for these 2 approaches:
Which is the best approach and why?
Thank you in advance.
Option 1 is definitely wrong, what is described there is not a dimensional model.
Option 2 is a correctly designed dimensional model. Whether it is the best way to dimensionally model your data depends on your reporting requirements.