Slowly Changing Dimension?

  • I'm working on a data warehouse design (just for learning)... it's your basic Sales data warehouse. Where this one is different is that Customers are hospitals, so they don't really move.  The company does reassign some customers to new sales territories at the start of a fiscal year. How do I model this correctly?

    I think I have two keys for a Customer in the data warehouse... The Unique key points to a Customer being assigned to a Territory for period of time
    CREATE TABLE Customer (
        CustomerKey INT PRIMARY KEY,  --  an instance of a Customer in a territory for a time span 
        CustomerNumber INT NOT NULL,  -- points back to same customer every time.
        CustomerName VARCHAR(...) NOT NULL,
        TerritoryID.
    );

    What I'm confused about is how to model this so that I can get totals for a single Customer across time... do the CustomerKey and the TerritoryKey (that the customer was assigned to at the time of the sale) go in the Fact table?

    (Yes, I do actually have Data Warehouse Toolkit right next to me... this is just a hard topic for me to get my head around!)

    Thanks!

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply