SYSTEM
Cleaning a database and keeping it clean
A process that reviews the tables, finds duplicates and misspelled data, normalizes them and records every change. It can be run again whenever needed.
- Diagnosis per table
- What is wrong in each one before touching anything
- Changes recorded
- Every change is recorded and can be reviewed and undone
- Doubts go to a person
- What isn't clear doesn't get corrected on its own
- Repeatable
- The process is run again, not a one-off cleanup
What was happening
The database had grown for years without anyone setting how each thing should be written. There were duplicated customers and items because they came from different systems and teams, dates and names in several formats, and fields that were empty or had values that didn’t add up. Depending on which table you queried, the same report gave one figure or another.
What the system does
First it looks. It goes through each table and produces a diagnosis: which fields are empty, which formats coexist, where there are odd values. With that in front of us, we decide what gets corrected and in what order.
Then it looks for duplicates even when they aren’t identical: the same customer written two ways, the same item with another code. It normalizes formats, proposes filling in what can be deduced from other data and cross-checks tables against each other to find contradictions.
Where a person decides
What the system can’t be sure of, it doesn’t correct on its own. It flags it so someone who knows the data decides whether two records are the same or not. Every change is recorded with the before and after value, so it can be reviewed and undone.
How the team works with it
It isn’t a one-off cleanup. The process stays in place and can be run again periodically, so new data comes in with the same standard as the data already corrected. The rules on what counts as a duplicate or how a field is written are maintained by the company’s team.