Fork me on GitHub
#xtdb
<
2022-07-12
>
Ivan Koz15:07:36

is there a talk or an article that explains in detail why is there a mandatory xt/id and what properties should it have

Ivan Koz15:07:58

hmm i've found that id is used as entity id to link document fields together for indexing purposes then what is the reasoning for requiring it to be provided manually and in multitude of possible types

Steven Deobald15:07:32

Some form of id is required to identify an entity across time. There isn't really a way around this (at a philosophical level — it's not a constraint of xtdb). XTDB is asynchronous, deterministic, and can scale to any number of nodes. The alternative to a manual id would be something automatic, but a central id is a pretty heavy constraint on those 3 qualities. An id isn't a pre-defined type partly because xtdb doesn't know what data you're putting into it. You may want to reuse a natural key from an upstream system. But it's also flexibility afforded the user in general; most folks will choose UUIDs, but not all. A linked data system might prefer URIs as ids, for example.

Ivan Koz15:07:42

thank you for the explanation

👍 1