Comment

Comment by Cieplak

You can achieve similar goals to Datomic using Postgres:

    create table snapshot (
        id uuid primary key default uuid_generate_v4(),
        ts timestamp without time zone default now(),
        entity_id uuid references entity(id),
        value jsonb
    );

    create table entity (
        id uuid primary key default uuid_generate_v4(),
        snapshot_id uuid references snapshot(id)
    );
Rather than mutating the value of an entity, you simply append a new record to the snapshot table and update the entity's reference to it. This gives you a full audit trail of the entity.
parent Cieplak 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton