Skip to content

The address correction that rewrote history

Failure story 10, in time, ownership and inter-agency data.

An agency receives a correction on April 10: the resident’s address changed on March 1. On March 15, the agency had made a decision and mailed a notice. What address should appear when someone reviews the March 15 decision?

There are two correct answers, to two different questions. Most systems can give only one of them.

Assumption Value
Resident Lived at A from January; moved to B on March 1
What the agency knew Address A, until April 10
March 15 The agency decides to reduce the resident’s benefit and mails a notice, with appeal rights, to A
April 10 A partner agency reports that the resident has lived at B since March 1
Address table One history: each row is an address with the dates it was effective
May 20 The resident appeals, saying they never received the notice
Step What happens Address table
1 January: address A recorded. A, from Jan 1
2 March 15: decision made; notice mailed to A, the address on file. A, from Jan 1
3 April 10: the correction is applied, effective March 1. A, Jan 1 to Feb 28; B, from Mar 1
4 May 20: the hearing officer asks, “What address did the agency have when it sent the notice?” The query for March 15 returns B. unchanged
5 The record now implies the agency mailed the notice to an address it didn’t have, or mailed it to B when it was actually sent to A. Neither is true. unchanged

The correction was right. Applying it destroyed the evidence of what the agency knew.

Two kinds of time were stored in one column.

  • Effective time (also called valid time): when something was true in the world. The resident lived at B from March 1.
  • Recorded time (also called transaction time): when the system learned it. We learned that on April 10.

A table with only effective dates answers what was true on March 15? using today’s knowledge. A review of a decision needs what did we believe on March 15?, and that answer was overwritten when the correction arrived.

Aspect Design A: effective dates only Design B: effective time plus recorded time
A correction Edits the history Adds rows; nothing is overwritten
“Correct address on March 15, using today’s knowledge” B B
“Address known when the March 15 decision was made” Can’t answer (returns B) A
What the notice records A link to the person’s address The actual destination, A, copied at the time it was sent

After the April correction, Design B’s table holds three rows:

Address Effective from Effective to Recorded from Recorded to
A Jan 1 (open) Jan 1 Apr 10
A Jan 1 Mar 1 Apr 10 (open)
B Mar 1 (open) Apr 10 (open)

The first row isn’t deleted. It’s closed in recorded time: it’s what the system believed until April 10. The two questions are then two queries that differ only in which recorded time they use:

-- Correct address on March 15, using today's knowledge → B
SELECT address FROM address_history
WHERE person_id = :p
AND effective_from <= '2026-03-15' AND (effective_to > '2026-03-15' OR effective_to IS NULL)
AND recorded_to IS NULL;
-- Address known when the March 15 decision was made → A
SELECT address FROM address_history
WHERE person_id = :p
AND effective_from <= '2026-03-15' AND (effective_to > '2026-03-15' OR effective_to IS NULL)
AND recorded_from <= '2026-03-15 17:00' AND (recorded_to > '2026-03-15 17:00' OR recorded_to IS NULL);

Some databases support this directly: SQL:2011 defines system-versioned and application-time period tables, which several products implement.

After applying the April 10 correction, all three must hold:

  1. “Correct March 15 address, using today’s knowledge” returns B.
  2. “Address known when the March 15 decision was made” returns A.
  3. The March 15 notice shows that it was mailed to A, regardless of anything that happened to the address history afterwards.

Design A passes check 1 only. A design that copies the destination onto the notice but keeps a single history passes checks 1 and 3, and still can’t tell an auditor what the agency believed about any other field on March 15.

This check is in the checks catalog as test templates in Java and Python.

  • Nobody will ever ask what the system believed at a past moment: no appeals, audits, regulators or disputes. That rules out most government, financial and healthcare systems.
  • Corrections never apply to the past, because every change takes effect from the moment it’s recorded. Then the two times are always equal.

Discussion question. Before showing the table, ask the group to answer the challenge. Then ask the people who said A and the people who said B to explain their answers to each other. Both groups are right; the exercise is getting them to name the two questions.

Exercise. At the hearing, the resident shows that they reported the move to the agency’s call center on March 5, but the call center’s note was never entered into the address system until April 10. Which of Design B’s queries answers the hearing officer’s question now, and is the system’s recorded time the right time to use?

Worked answer

The query known when the decision was made still returns A, because the address system didn’t record B until April 10. But the hearing officer’s question has changed: it’s no longer what did the system know? but what should the agency have known? The agency, as an organization, was told on March 5. Recorded time in one table is when that system learned something, not when the organization did. Two ways to handle it: record the date the agency was informed as a separate attribute (reported on), or treat the call-center note as a source and record it when it was received. Either way, this is a policy question that the data model can’t answer by itself; it can only make sure the facts needed to answer it aren’t lost.

Written and edited by Abhinav Taduka, enterprise software architect.