Mnesia is an embedded Erlang database supporting in-memory and disk-based tables, transactions, indexing, sharding, and replication.
Mnesia is an embedded Erlang database that runs inside the same BEAM instance as application code. It stores Erlang terms in memory-backed or disk-backed tables and can keep an entire system within one operating-system process. section 10.3.3
Mnesia combines several database and distributed-system capabilities:
In-memory tables use ETS, while disk-based tables use DETS. section 10.3.3
Complex transactions, dirty operations, and secondary indexes support common database access patterns. section 10.3.3
Sharding and replication support distribution and availability, although larger deployments require additional care. section 10.3.3
Disk-backed tables inherit DETS's 2 GB limit, so larger tables must be fragmented. section 10.3.3
How Elixir in Action, Third Edition covers it
How deep it goes
Briefly identifies storage, transactions, indexing, sharding, and replication while deferring detailed treatment and research.
Examples
Uses ETS-backed memory tables, DETS-backed disk tables, dirty operations, secondary indexes, sharding, and replication as concrete capabilities.
What it assumes
Assumes familiarity with Elixir or Erlang, the BEAM, ETS, and DETS; presents Mnesia as a higher-level combination.
What you can do after
Evaluate whether embedded Mnesia storage fits a system's process model, tooling needs, scale, and table-size constraints.
How it connects
Connects ETS, DETS, transactions, secondary indexes, sharding, replication, and the BEAM runtime.
ETS tableuses · An ETS table is a mutable in-memory table implemented by the Erlang runtime for storing Erlang terms that can be accessed by multiple BEAM processes.
embedded databasekind of · An embedded database is a database engine integrated into and running within the same process or runtime as the application that uses it.
replicationuses · Replication is the creation or maintenance of multiple copies of data, state, or functionality across separate locations or components.
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.