Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging Customers in a customer dimension

Status
Not open for further replies.

mnmjones

IS-IT--Management
Aug 3, 2007
1
US
My transactional database allows customers to be merged if the customer has multiple accounts for the same household. Any order that the customer had in any of the accounts gets updated with the Customer Id that the accounts are being merged into. So the question is, how to handle the customer rows in the dimension that are no longer valid? At this point they will have nothing in the fact table so to me they are useless. I am thinking that I should delete them out of the dimension. My concern with keeping them in there is when we do some type of count, I could end up counting the same customer twice unless I put in some type of clause like “where customer is not merged”. I would hate to have to have that clause in every query that I build. Has anybody else come across this and how do you handle this. Thanks,
 
Actually, it boils down to this question: are you storing customers or accounts in your dimension? (in other words: what s the grain of you fact?)
When you store customers, you can merge multiple accounts into 1 customer. When you need to store accounts, you can not.

 
Hans63 makes a good point about granuarity. Another solution to consider is to remove them to a separate table called "inactive" or "merged" accounts. You would choose this solution if you need to account for the merged customers, or if there could be questions about the old number. When in doubt, don't physically delete the data, just logically delete it. Whenever someone physically deletes from a data store, I cringe. It should porbably be archived somewhere. Once destroyed, data cannot be recreated - and storage is cheap and getting cheaper.

-------------------------
The trouble with doing something right the first time is that nobody appreciates how difficult it was - Steven Wright
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top