Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Merging Customers in a customer dimension

Merging Customers in a customer dimension

Merging Customers in a customer dimension

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,

RE: Merging Customers in a customer dimension

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.

RE: Merging Customers in a customer dimension

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close