Talks
Events

Datomic Auto Schemas

Paula Gearon at Clojure/conj 2017

While Datomic is well known as a database that manages entities with flexible structures, the attributes of those structures must be declared in a predefined schema before Datomic can load any data. This can be awkward when working with common arbitrary data structures, like JSON, since the schema may not be known ahead of time. This talk looks at how to import and export arbitrary JSON into Datomic, using straightforward, auto-generated schemas that do not lose any information, even when the JSON does not seem to be a simple fit. We also show how Datomic features can be used to collate multiple interspersed read and write operations into a single Datomic transaction.