liveBook · Manning

DETS

As explained in Elixir in Action, Third Edition

DETS is Erlang's disk-based term storage facility that organizes terms in tables backed by individual files.

DETS is disk-based term storage for BEAM applications. It organizes Erlang terms in tables, with each table backed by a single file, providing a simple way to persist data on disk. section 10.3.3

DETS is useful when an embedded, file-backed store is sufficient:

  • Keeps data inside the same BEAM operating-system process rather than requiring a separate database service. section 10.3.3
  • Allows concurrent writes, including writes targeting the same row, with basic isolation. section 10.3.3
  • Offers an interface somewhat similar to ETS, but with fewer features. section 10.3.3

DETS remains a relatively simple facility rather than a full database system. Mnesia builds on ETS and DETS to add features such as transactions, secondary indexes, sharding, and replication. section 10.3.3

How Elixir in Action, Third Edition covers it

How deep it goes
Defines tables, files, isolation, and ETS similarity, but defers detailed operation and API coverage.
What it assumes
Assumes familiarity with ETS-like tables and Erlang terms.
What you can do after
Evaluate DETS as a lightweight persistent store and identify when Mnesia or external database tooling may be more appropriate.
How it connects
Connects disk persistence with ETS, Mnesia, Erlang terms, embedded databases, and BEAM processes.

This explainer was generated by Manning's knowledge graph from the text of Elixir in Action, Third Edition. The section links point to the parts of the book it draws on.