Friday, August 21

WNTD: Watch your ID values

What Not To Do: Random horror stories from the trenches.

Watch your ID values (this one is more technical, bear with me).  Let’s say you have an old system that uses 8-digit ID numeric values for every table - people, accounts, cases, etc.  A Case ID might match a Account ID, but that’s okay, they are always kept separate in the old system.

Then you migrate your data to a new system, which uses longer GUIDs (Globally Unique IDs) - the new system you can guarantee that no two records (no matter what table they are in) have the same ID.  But the old data was just migrated in as-is, into similar tables.  At the database level, there are no duplicate records in a table, so no problems, right?  What are the chances that it matters that there are duplicate IDs in different tables?

Well, roughly 100%.  Don’t ask me how I know, I’m sworn to secrecy, but associating the wrong customer with the wrong account can be a problem, especially when the customer is real and the account is a test account with a dumb name.  When a mailing goes out to the correct customer address, with the less-than-helpful addition of the dumb account name, it's what we in the CRM business call a "problem".  (Well, the actual name is an "ohshit".)