/tools

Temporal-model designer

Design valid-time, recorded-time or bitemporal history. Explore sample versions, retroactive corrections and as-of results, then prepare PostgreSQL range-based schema and query templates. All reasoning stays in this browser.

Save each form before exporting or changing views. Saving/selecting restores other unsaved forms. Undo keeps 20 revisions; export JSON before reloading. Samples are declarations, not inspected database rows.

As-of exploration

History timeline

Periods are [start, end): start included, end excluded. Arrows mean an unbounded upper end; the drawing ends at its display horizon. Select a bar to edit a sample. The red line is the selected as-of point on this axis. At most 40 versions/page; full definitions remain in JSON.

Sample consistency

Design and sample findings

    Temporal design

    Ordered business key fields

    Stable field IDs preserve sample bindings through renames and reorderings. New fields make old samples incomplete until repaired. Removed fields remain as unused entries in saved sample JSON. version_id, valid_period, system_period and attributes are reserved physical names.

    Sample history versions

    New version

    Open temporal model JSON
    Semantics, SQL scope and limits

    Valid time describes when a claim applies in the business. Recorded time describes when this version of the claim was known to the system. Bitemporal non-overlap means that two versions for one key cannot overlap on both axes at once. Historical claims may overlap in validity when their recorded periods are disjoint. The sample timeline shows the selected recorded-time slice in bitemporal mode; recorded-only mode draws recorded periods.

    Samples use half-open periods with finite starts and optional unbounded ends. Calendar dates use strict Gregorian YYYY-MM-DD, years 0001–9999. Instants use UTC YYYY-MM-DDTHH:mm:ss[.ffffff]Z; microseconds are compared exactly with BigInt. Local wall times, named time zones, offsets, leap seconds, 24:00 and SQL infinity elements are outside this sample grammar. Changing mode/type does not convert sample strings. Key matching canonicalizes bigint/UUID; text compares exactly and may differ from server collation.

    Overlap findings compare all valid sample pairs, independent of the selected as-of point. Internal gaps concern the union of periods per key in the selected slice, correctly accounting for nested intervals and open ends. No coverage horizon is assumed. Invalid samples are excluded from reasoning and listed explicitly. Duplicate as-of claims remain visible. JSON syntax does not prove PostgreSQL jsonb range/Unicode compatibility.

    DDL creates a new history table with business keys, an identity version ID, range periods and JSONB attributes. It requires btree_gist, an existing application schema and sufficient extension privileges. CHECKs require nonempty half-open periods, finite lower bounds and either finite or unbounded upper bounds. An exclusion constraint prevents period overlap per key (both periods in bitemporal mode). Gap-free coverage, automatic system-versioning, current-row clocks, temporal foreign keys, load/write APIs, period splitting and migrations are not generated. The application must maintain periods transactionally and serialize concurrent corrections. Define the recorded clock and multiple-updates-per-transaction policy.

    Query templates include as-of selection, overlap pairs and internal gap checks over a running union frontier. As-of and gap queries have separately documented parameter numbering. Queries/DDL are not executed. Exports preserve full model JSON, all sample versions in notes and the selected timeline page in SVG.

    Limits: 1 MB, 8 business key fields, 400 sample versions, 200 characters/key value, 8,000 characters/payload. SVG shows 40 versions/page with shortened labels and full tooltips. Names assume 63-byte PostgreSQL identifiers. Undo keeps 20 revisions. No input is stored or transmitted.

    PostgreSQL range types · btree_gist