DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

Datomic


Datomic is a proprietary database management system. It is an operational DBMS, in other words, it allows updates in real time. Instead of assigning and overwriting values into named attributes, Datomic keeps track of all immutable facts over time, which sets Datomic apart because previous states can be accessed easily. Datomic is also a distributional DBMS, which provides horizontal read scalability. Therefore, Datomic is a good fit for storing a history of valuable records that requires operational flexibility and read scalability.[04][05]

In addition, Datomic Cloud is built for AWS integration and is a quicker and easier way to access Datomic on AWS.

Database Entry

Datomic


Datomic is a proprietary database management system. It is an operational DBMS, in other words, it allows updates in real time. Instead of assigning and overwriting values into named attributes, Datomic keeps track of all immutable facts over time, which sets Datomic apart because previous states can be accessed easily. Datomic is also a distributional DBMS, which provides horizontal read scalability. Therefore, Datomic is a good fit for storing a history of valuable records that requires operational flexibility and read scalability.

In addition, Datomic Cloud is built for AWS integration and is a quicker and easier way to access Datomic on AWS.[04][05]

History[06][07]


Early March 2012, the Relevance team (later joined with Metadata to form Cognitect) around Rich Hickey released Datomic, which they have started to work on since 2010.

To make better use of recent advancements in cloud computing, Datomic Cloud was release in early 2018, which is better tailored to AWS.

Compression[08]


Index trees contain "segments," arrays of records that are serialized and then compressed with zip. Compression allows more efficient caching and storage.

Concurrency Control[09]


Datomic supports optimistic concurrency control, which is made possible by its built-in compare-and-swap :db/cas.

Data Model[10][08]


Datomic stores immutable facts as datoms over time. A datom follows the form of (entity, attribute, value, time). Although Datomic doesn't require a table schema that specifies attribute columns in advance, it requires to specify properties of individual attributes. This is called universal schema.

Foreign Keys[11]


Foreign keys can be defined using :db.type/ref attribute, but no foreign key constraints are enforced on them automatically. User needs to specify their own database functions to impose those constraints.

Indexes[08][12]


Datomic indexes are covering indexes. In other words, instead of storing reference to data in the index, Datomic directly reads data from index. The index trees are shallow, with at most 3 levels: root, directories and segment leaf. Datomic maintains four index trees with different sorting orders for efficient access of different queries.

Isolation Levels[13]


There is only one thread responsible for writing transactions, so transactions are always serializable.

Query Compilation


Query Interface[14]


Datomic's query interface is an extension from Datalog. The main difference is that Datalog systems usually have a global fact database and a set of rules, but Datomic Datalog could take multiple databases and sets of rules.

Storage Architecture


Storage Model[15][16]


Datomic treats storage as a service, which means that Datomic only provides the ways to access underlying storage, but doesn't provide the actual storage. Storage services could also be switched easily by simply changing the connection string.

Stored Procedures[17]


Stored procedures are represented as transaction functions in Datomic, which can be invoked during transaction processes.

System Architecture[15][18]


A Datomic system consists of a computing stack, a set of storage services, and an optional query group. The computing stack could have multiple computational units for Datomic system called nodes. Each node has its own low-latency cache, transactions, and queries.

Views


Compatible Systems
Eva Eva

Citations

18 sources
  1. Datomic - Overview datomic.com
  2. Introduction | Datomic datomic.com
  3. Datomic - Wikipedia wikipedia.org
  4. https://docs.datomic.com/on-prem/getting-started/brief-overview.html datomic.com Dead — Check Archive
  5. Datomic - Overview datomic.com
  6. Rich Hickey's Datomic embraces Cloud, intelligent Applications and Consistency - InfoQ infoq.com
  7. Datomic - Datomic Cloud datomic.com
  8. Unofficial guide to Datomic internals @ tonsky.me tonsky.me
  9. https://docs.datomic.com/cloud/best.html#optimistic-concurrency datomic.com Dead — Check Archive
  10. https://docs.datomic.com/on-prem/architecture.html datomic.com Dead — Check Archive
  11. https://docs.datomic.com/on-prem/schema.html datomic.com Dead — Check Archive
  12. https://docs.datomic.com/on-prem/indexes.html datomic.com Dead — Check Archive
  13. https://docs.datomic.com/on-prem/acid.html datomic.com Dead — Check Archive
  14. https://docs.datomic.com/on-prem/query.html datomic.com Dead — Check Archive
  15. Datomic Cloud Architecture | Datomic datomic.com
  16. https://docs.datomic.com/on-prem/storage.html datomic.com Dead — Check Archive
  17. https://docs.datomic.com/on-prem/database-functions.html#transaction-functions datomic.com Dead — Check Archive
  18. Datomic Cloud Architecture | Datomic datomic.com
Revision #8 Last Updated: