[erlang-questions] Re: Some tips on Mnesia

Rapsey rapsey@REDACTED
Mon May 24 06:45:35 CEST 2010


About that key value approach. My solution is a bit different. Let's say I
have a database of nodes and store a list of IP addresses to them. I save
them like so:
{node,{address,NodeName}}, {IP,Port}

This way I can query for that exact information mnesia:(dirty_)read, or I
can get a list of all node addresses with mnesia:select -
{node,{address,'_'}}, or get a list of all node information with {node,'_'},
or get all info about a node {node,{'_',NodeName}}.


Sergej

On Sun, May 23, 2010 at 10:46 PM, Igor Ribeiro Sucupira <igorrs@REDACTED>wrote:

> Second and third posts:
> http://igorrs.blogspot.com/2010/05/mnesia-one-year-later-part-2.html
> http://igorrs.blogspot.com/2010/05/mnesia-one-year-later-part-3.html
>
> On Thu, May 20, 2010 at 12:53 PM, Igor Ribeiro Sucupira
> <igorrs@REDACTED> wrote:
> > For those people who are starting to work with Mnesia, I'm writing a
> > short sequence of blog posts that are intended to point out some
> > relevant facts that don't seem to be well-known and could hurt you in
> > the beginning.
> >
> > I'll try to focus on the information that you can't google.  ;-)  But
> > maybe in the end I'll also summarize the important tips that I learned
> > from other blogs.
> >
> > Here is the first post:
> > http://igorrs.blogspot.com/2010/05/mnesia-one-year-later.html
> >
> > Good luck.
> > Igor.
> >
> > --
> > "The secret of joy in work is contained in one word - excellence. To
> > know how to do something well is to enjoy it." - Pearl S. Buck.
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>


More information about the erlang-questions mailing list