Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a list of products per costumer. Costumers can delete or add products to their list. I want to know in each day what is the list of products (and count) by costumer.

My first approach is to have a fact table with all products by client each day.

Is this the best approach? This fact table will grow at the same rate that the products are added to costumers list.

btw i'm using Pentaho.

share|improve this question

You could do that. I'm thinking something along the lines of having an active and inactive date on your fact table for each product for each customer. Then you could mark a previous product with an inactive date.

This should allow you to query it for date ranges that are include a specific date to get what their product list was for a specific point in time.

share|improve this answer

If you have multiple product table for each customer then your you should write an Indexed View to get these figures instead of going into Fact Table. Even if you have a single table for products for customers, then you should go for an indexed view.

share|improve this answer
I'm not using Microsoft Sql Server, so i think this is not applicable – balsagoth Nov 19 '13 at 16:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.