Fixing what accumulated.
WHAT TO ESTABLISH FIRST
How the bad data got there.
WHY BEFORE FIXING
Otherwise it reappears.
WHAT COMMON CAUSES ARE
Missing constraints Imports without validation Application defects Manual changes
WHAT TO FIND
Duplicates Orphaned rows Values outside permitted ranges Inconsistent formats Empty strings where absence was meant
HOW TO FIND ORPHANS
A query for rows whose reference has no match.
WHAT TO DO BEFORE CHANGING ANYTHING
Take a backup, and copy the affected rows.
WHAT ORDER TO WORK IN
Identify Quantify Decide the rule Apply in batches Verify
WHY QUANTIFY
The volume determines the approach, and sometimes the decision.
WHAT TO DECIDE PER PROBLEM
Correct it Remove it Leave it, and exclude it
WHO DECIDES
The business, for anything with meaning.
WHAT TO DO AFTERWARDS
Add the constraint that prevents recurrence.
WHY THAT IS THE ACTUAL FIX
Cleaning without constraining means cleaning again.
WHAT TO RECORD
What was changed, and by what rule.