Use Cases

Edit document on Github

Why Bitemporality Matters

Temporal applications often need two independent timelines:

These two timelines diverge constantly. A price correction recorded today might apply retroactively to last month. A medical diagnosis entered on Tuesday might be backdated to the previous week. Preserving both timelines lets an application distinguish a correction from the time the corrected fact applies.

SirixDB records transaction time at commit. Applications supply valid time and configure valid-time paths for bitemporal queries. The examples below illustrate where that distinction is useful.

Two Timelines, One Reality Transaction Time (when recorded in the system) Jan 5 Insert price $100 Mar 15 Error discovered Mar 20 Correction recorded Valid Time (when true in the real world) Jan 5 Original: $100 Feb 1 Corrected: $95 Recorded Mar 20 — but true since Feb 1

Financial Services & Regulatory Compliance

Regulatory Audit Trails

Financial institutions must answer questions like: “What did we know about this customer’s risk exposure on March 1st, as understood on March 15th — versus after a correction was applied on March 20th?”

With valid-time paths configured, a bitemporal query selects the stored facts at both coordinates.

Bitemporal Coordinate Space Transaction Time Valid Time Jan Feb Mar Apr Jan Feb Mar Apr Rev 1: Initial data Rev 2: Discovery (Mar 15) Rev 3: Correction (Mar 20) query(Mar 15, Mar 1)
(: What was the recorded risk exposure on March 1st,
   as our system understood it on March 15th?
   Signature: jn:open-bitemporal($coll, $res, $transactionTime, $validTime) :)
jn:open-bitemporal('risk-db', 'exposures',
  xs:dateTime('2025-03-15T00:00:00Z'),
  xs:dateTime('2025-03-01T00:00:00Z'))

Sanctions & Watchlist Screening

Sanctions lists change frequently, sometimes retroactively. A person added to a sanctions list today might be flagged as “sanctioned since 2023.” Compliance teams must answer two separate questions:

These are different questions; applications can preserve the input facts and query each timeline separately.

What-If / As-Of Scenario Analysis

Portfolio managers need to re-run valuation models against historical market data: “If I re-run my model using the market data we had last Tuesday — not today’s corrected data — what would the P&L be?”

This requires freezing both valid time (the market state) and transaction time (what was recorded when). SirixDB lets you open a read transaction at any (transaction-time, valid-time) coordinate pair. The application still supplies the model and the valid-time information.

Pricing & Rate History for Billing Disputes

A customer disputes a charge from three months ago. The price has since changed, and the rate table has been corrected twice. You need to prove:

  1. What rate was in effect for the customer’s usage period (valid time)
  2. What your system believed the rate to be when it generated the invoice (transaction time)

Recording both times preserves the distinction between an original rate and a later correction.


Healthcare & Life Sciences

Treatment Decision Reconstruction

A patient’s lab result arrives on Tuesday but is corrected on Thursday. A doctor made a treatment decision on Wednesday based on the Tuesday value. Was the decision reasonable given what was known at the time?

SirixDB can retain both: the original result (transaction time: Tuesday) and the correction (transaction time: Thursday, valid time: Tuesday), making the full clinical picture queryable.

Retroactive Corrections in Medical Records

Medical records involve constant corrections: updated diagnoses, reclassified procedures, amended prescriptions. Each correction has a “when it was true” (valid time) and “when we recorded it” (transaction time). The application defines its retention and access requirements.

SirixDB retains committed revisions while the resource exists. Transaction time is recorded at commit; valid-time queries additionally require application-supplied values and configuration.


Courts require point-in-time reconstruction: “Show me the exact state of this contract record as our system understood it on June 3rd, 2024.”

A temporal read transaction can retrieve the retained resource revision. Access control, evidence handling and retention policy remain application responsibilities.

Anti-Fraud Detection

Fraudsters manipulate records and hope the original state is lost. Bitemporality makes this detectable: you can identify that a transaction claiming to be from January was only recorded in March by comparing valid time against transaction time.

(: Find records where valid-time was backdated
   more than 7 days before transaction-time :)
for $rev in jn:all-times(jn:doc('ledger', 'transactions'))
for $r in $rev[]
where sdb:timestamp($rev) gt sdb:valid-from($r)
  and sdb:timestamp($rev) - sdb:valid-from($r)
    gt xs:dayTimeDuration('P7D')
return $r

Revision history supports auditing; it is not a tamper-proof security boundary. Administrators can delete resources or modify storage files, so protect access and retain independent backups.


Supply Chain & Manufacturing

Provenance & Recall Tracing

When a contaminated batch is discovered, regulators ask: “Where was this ingredient at every point in time, and when did each participant record receipt or shipment?”

A supplier might backdate a shipment record after the fact. Bitemporality distinguishes the actual chain of custody from the chain of paperwork — critical for pinpointing liability. Capturing source identifiers and recording corrections explicitly helps preserve provenance.

Digital Twin Calibration

Industrial IoT digital twins are continuously calibrated against sensor data. When sensors are recalibrated, historical readings are retroactively adjusted. Engineers need to compare:

This is essentially replaying history along both timelines simultaneously with both timelines available to the query.


Data Engineering & Analytics

Time-Travel Debugging for Data Pipelines

When a downstream ML model suddenly degrades, you need to answer: “Did the source data change? When? Was it a correction or new data?”

Bitemporality lets you diff any two (valid-time, transaction-time) coordinates to pinpoint exactly what shifted and when it was recorded. Results depend on the source records and time information the application captured.

Reproducible Scientific Data Analysis

A researcher publishes results in June based on a dataset that gets corrected in August. Peer reviewers need to reproduce the June analysis against the exact data the researcher had — not the corrected version.

SirixDB gives you AS OF transaction-time June — the dataset as it existed when the researcher queried it. Retain the selected revision and the analysis code together for reproducibility.

Slowly Changing Dimensions

Bitemporal resource history can support applications that need both recorded time and effective time for dimension records. Choose a representation that fits the surrounding analytics system.

Valid-time fields and their configuration are still supplied by the application.


Content & Configuration Management

Collaborative Document Editing with Full History

Think version control for structured data. “Who changed this field, when, and what was it before?” becomes a temporal query. SirixDB provides built-in diffing and revision history.

Configuration Drift & Incident Root Cause

“The production outage started at 14:00. What was the configuration state at that time? Was a config change pushed at 13:55 that we didn’t learn about until the post-mortem?”

Bitemporality naturally captures both when a config was effective (valid time) and when it was recorded in the config management system (transaction time). Capture both times explicitly when recording configuration changes.


Journalism & Open Source Intelligence

Websites, government filings, and corporate disclosures change — sometimes silently. Investigative journalists track “What did this company’s filing say on March 1st?” versus “When did we first capture that version?”

SirixDB retains structured, queryable data — with the ability to diff any two snapshots, navigate the document tree at any point in time, and query across the full revision history.


The Common Thread

Every use case above shares a single insight: reality is messy, corrections are inevitable, and “when we recorded it” is a different question from “when it was true.”

Any system that overwrites state destroys information that turns out to be critical the moment someone asks “but what did we think was true last week?”

Audit tables, CDC pipelines, event logs and snapshots can also preserve history. SirixDB offers versioned document storage as another approach.

Traditional Workarounds vs Native Bitemporality Traditional Database Audit Tables CDC Pipeline Event Log Periodic Snapshots Manual Versioning Application-managed history SirixDB Transaction Time Valid Time Append-Only Bitemporal Store Native · Queryable · Immutable

SirixDB makes retained revisions queryable. Query latency depends on the workload, cache state and selected versioning strategy; valid-time correctness depends on application-supplied values.


Ready to try it? See the Getting Started guide or explore the REST API. Questions? Join the community forum or the Discord.