Role differences between facts

View previous topic View next topic Go down

Role differences between facts

Post  bcm on Mon Aug 24, 2009 11:22 am

A common scenario in a data warehouse is having two separate entities such as customer and reseller. They are 2 distinct roles and would require their own separate dimensions. My question is what happens when you add a fact table that treats these 2 entities as the same thing such as clickstream data.

For instance, say I have a web store that allows users to buy and sell items and you must be logged in to do so. When a sale is made there is a distinct buyer and a distinct seller which is modeled by 2 separate dimensions. What if I then wanted to add clickstream data to the warehouse? This is analyzed on a user basis and would be cumbersome if customers and resellers had to be treated separately. I can combine everyone into the same table which is what I'm leaning towards but I have a feeling there will be some pitfalls with doing that.

Basically I'm looking for the pros and cons to each method and what the generally accepted way is to do it if there is one. Thanks!


Posts : 1
Join date : 2009-08-24

View user profile

Back to top Go down

Re: Role differences between facts

Post  ngalemmo on Mon Aug 24, 2009 12:46 pm

Combining them will work fine. Depending on the attributes you may want to implement a subtype table for one or both. The subtype table(s) should have the same primary key as the main dimension.

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum