Effective Time and Recorded Time

An event can become effective at one time and be recorded by a system later. Store both when readers need to answer both questions.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace a delayed observation
  2. Check report filters
  3. Compare a policy effective date with its recording date
  4. Keep corrections and overlapping periods interpretable

Trace a delayed observation

A status is effective Monday and imported on Wednesday. A question about the business state on Tuesday differs from what the application had recorded by Tuesday. Timestamp meanings distinguish these concepts.

Check report filters

Choose the correct time field for each report and include a delayed example in tests. Row history provides a model that can retain both.[1]

Compare a policy effective date with its recording date

A price change takes effect on June 3 but is entered on June 5. A report asking what price applies on June 4 can use effective time. A report asking what the system knew on June 4 needs the recording timeline. See current rows and historical events.

Effective start: June 3
Recorded on: June 5
Query by applicability and query by knowledge can yield different values

Keep corrections and overlapping periods interpretable

Define boundaries and rules for retroactive changes. Test a correction that changes a past answer and a separate as-known-at query that preserves the historical observation.

References

  1. PostgreSQL Global Development Group, Concurrency Control ↩