volunteer wanted to write a few FAQ entries about Mnesia

Chris Pressey cpressey@REDACTED
Thu Feb 20 23:35:06 CET 2003

On Thu, 20 Feb 2003 11:26:13 +0100
Matthias Lang <matthias@REDACTED> wrote:

> Hi,
> The Mnesia section of the FAQ has been embarassingly barren for far too
> long. 
> I know zilch about mnesia, so I need a volunteer to write that chapter
> (or help me write it, I'm happy to take care of the formatting and
> editing). Mail me if you can help.
> The alternative is to remove the chapter entirely. Which seems a shame
> because there are some interesting mnesia-based applications around.

I can try to make it a bit less barren.  I'll post it to the list in case
anyone wants to review it and perhaps catch my mistakes (I haven't used
Mnesia for a while now.)

What is Mnesia good at?

Locking and Transactions - if you need to keep a database that will be
used by multiple processes and/or nodes, using Mnesia means you don't have
to write your own access controls.

Distribution - tables can be replicated at many nodes, both for efficiency
(database lookup is a local activity) and robustness (redundancy means if
one node goes down, other nodes still have copies of the data.)

Non-fully-normalized data - unlike most database systems, records can
contain data of arbitrary size and structure.

Monitoring - processes can subscribe to events which are sent when various
operations on the data take place (update, delete, etc)  The RDBMS package
allows even more fine-grained control.

What is Mnesia not so good at?

It's not as quick as ETS for when you don't need locking, etc.

How does Mnesia's performance compare to Oracle, Sybase, etc?

No idea, sorry.

Is Mnesia good at storing blobs?

It's probably more efficient to write the blobs to a filesystem and to
keep only the filename in the database.

Is there an SQL interface for Mnesia?

Mnemosyne is the query engine for Mnesia.  It does query optimization.
It is also a language extension in which queries are phrased like list
comprehensions, which is a much better fit to Erlang than SQL.

Other questions might include: where do the names come from (basically
Greek mythology, see the recent mailing list archives for more


More information about the erlang-questions mailing list