I have a set of OLAP cubes, in the form of a snow-flake schema, each representing one factory.
I have three concepts that for some factories clearly behave as 3 dimensions, and for other factories clearly behave as 2 dimensions.
The concepts are always the same: "products", "sales agents" and "customers".
But for some cases, I doubt if I should model it as a purely 3 dimensional cube or I should play around with some tweak or trick with a 2 dimensional cube.
Cases A and B are the ones that are clear for me, and Case C is the one that generates my wonderings.
CASE A: Clearly a 3 dimensional cube
Any agent can sell any product to any company. Several agents are resposible together for the same set of customers.
I model this case as this:
CASE B: Clearly a 2 dimensional cube
Every agent is 'responsible' for a portfolio of customers, and he can sell any product but only to his customers. The analysis is made on 'current responsability on the portfolio' so if an agent leaves the company, all his customers are reassigned to a new agent and the customer uniquely belongs to the new agent.
I model this case as this:
CASE C: My doubts
A customer may have been assigned a single agent or a set of several agents each one being responsible for a ProductCategory.
For example:
Alice
managesTablesAndWoods ltd
andGreenForest ltd
.Bob
managesChairs ltd
andFastWheels ltd
.Carol
managesForniture ltd
ONLY forProductType = 'machinery'
and also managesFrozenBottles ltd
for ANY type of product.Dave
also managesForniture ltd
but ONLY forProductType = 'consumables'
and also managesHighCeilings ltd
for ANY type of product.
QUESTION:
In this example "Case C":
Are customer
and agent
independent dimensions because Forniture ltd
has relation both to Carol
and Dave
, so it is a 3D cube?
Or it is a 2D cube, where agent
is not an independent dimension, but it is an aggregator of customer
"conditioned" somehow by the ProductCategory
product aggregator?
I would like to see how would you model this. Thanks in advance.