Search code examples
validationdatabase-designarchitectureprocessdata-integrity

Practices for allowing systems to accommodate human error?


Systems have to sometimes accommodate the possibility of real world bad data. Consider that some data originates with paper forms. And forms inherently have a limited means of validating data.

Example 1: On one form users are expected to enter an integer distance (in miles) into a blank. We capture the information as written as a string since we don't always end up getting integer values.

Example 2: On another form we capture a code. That code should map to one of the codes in our system. However, sometimes the code written on the form is incorrect. We capture the code and allow it to exist with an invalid value until some future time of resolution. That is, we temporarily allow bad data since it's important to record the record even if some of it is invalid.

I'm interested in learning more about how systems accommodate bad data, that is, human error. Databases are supposed to be bastions of data integrity, but the real world is messy and people make mistakes. Systems must allow us to reflect those mistakes.

What are some ways systems you've developed accommodate human error? What practices have you used? What lessons have you learned?

Any further reading on the topic? (I had trouble Googling it.)


Solution

  • A government department I worked in does a lot of surveys, most of which are (were) still paper based.

    • All the results were OCR'd into the system.
    • As part of the OCR process a digital scan of the forms is kept.
    • Data is then validated, data that is undecipherable or which fails validation is flagged.
    • When a human operator reviews the digital data they can modify the data if they are confident that they can correctly interpret what the code could not; they (here's the cool bit) can also bring up the scan of the paper based original, and use that to determine what the user was trying to say.

    On a different thread; at some point you want to validate the data coming in against any expected data ranges that you want it to conform to; buy rejecting it at the point of entry you give the user a chance to correct it - the trade off is that every time you reject it you increase the chance of them abandoning the whole process.

    At some point in your system you need to specify the rules which will be used for validation. At the end of the day a system is only going to be as smart as those rules. You can develop these yourself into the code (probably the business logic) or you might use a 3rd party component.

    having flexible control over the validation is pretty important as they are likely to change overtime.