[erlang-questions] Conceptual questions on key-value databases for RDBMs users

Ulf Wiger <>
Wed Nov 3 08:00:50 CET 2010


On 2 Nov 2010, at 21:14, Silas Silva wrote:

> * Is there any guide, tutorial, book, whatever, that tries to introduce
>  NoSQL databases to SQL users?

Not really, although the Mnesia User's Guide does try to use some 
RDBMS terminology.

http://www.erlang.org/doc/apps/mnesia/Mnesia_chap2.html#id58308

> * Key-value databases are surprising simple.  I know you solve
>  relationship by denormalizing data.  What data should be normalized?
>  What shouldn't?  How do you update denormalized data?

The thing to keep in mind is that mnesia was not designed to provide
a better way to handle relational data sets. It was originally designed 
to be a real-time, in-memory database for telecom apps, and most of 
the data there is well suited to simple primary-key access and few 
enough relations that they can be hard-coded.

The actual updating of data is perhaps not so terribly different, but 
mnesia will not do much checking for you, so you have to keep track
of relations and dependent updates in the code. If this gets to be a 
great burden in your application, it is probably a sign that you need
an RDBMS after all. They really excel in certain application domains.


> Sorry for such simple and general questions.  Things were simple up to
> the moment that I realized that it would be easily solved with a JOIN
> SQL statement.  :-)

QLC offers some support for basic joins. You need to be a bit more careful
about how you word the queries than with SQL, since QLC only does some
rudimentary optimizations.

BR,
Ulf W

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com





More information about the erlang-questions mailing list