Database / Mnesia basics Interview questions
What is Mnesia?
Mnesia is Erlang/OTP's built-in distributed database management system, designed to run inside the same BEAM nodes as your application rather than as a separate external service. It stores ordinary Erlang terms directly — tuples and records — so there's no object-relational mapping layer between your code and the data.
It ships with the OTP standard library, meaning any Erlang system can use it without adding an external dependency. Its core selling points are:
- Tables can be replicated across multiple nodes in a cluster
- Reads and writes can be wrapped in ACID-style transactions
- Data can live purely in memory, on disk, or both
- Schema and data changes can happen while the system keeps running
It's commonly used for cluster-local configuration, session state, and routing data — anywhere you want a shared, consistent, in-cluster store without standing up a separate database.
More Related questions...