[erlang-questions] Wrap my mind around NoSQL (Mnesia)

Avinash Dhumane nistrigunya@REDACTED
Sat Nov 25 04:39:29 CET 2017

Separate (and postpone) the data representation (i.e. tables) concerns from
the data access (CRUD).

The access needs of the application will determine the tables (whether set
or bag or ordered) and objects & attributes (keys and values).

That is, form follows the function.

On Fri, Nov 24, 2017 at 8:20 PM, Silas <silas@REDACTED> wrote:

> Hi!
> (This is mainly a question about NoSQL conceptions.  If it is the wrong
> place to ask, sorry for that and, please, let me know).
> After years using RDBMS (with structured and OO paradigms at the
> programming language side) I'm diving into functional programming.  When
> choosing a programming language to practice, I immediately fell in love
> with Erlang for this simplicity and beauty.
> After reading some documentation, some chapters of a book and trying
> simple projects I decided to try a more complex project with Mnesia.  It is
> a social bookmarks website (something similar to what del.icio.us is)
> where user can bookmark a URL and associate one or more tags with it.  For
> instance, some could bookmark "erlang.org" to tags
> "functionalprogramming", "programminglanguage" and others.  Users also can
> query other users bookmarks, see what links are associated with a tag and
> what tags are associated with a given bookmark.
> In my mind, an RDBMS is a perfect solution for this problem.  I'm trying
> to fit it into the key -> value model, though.  My first question is: is
> this possible or I'm just doing the wrong thing by forcing the wrong
> solution?
> For what I understood, I need to get rid of normalization rules.  So I
> devised something more or less like that:
> User table: {username, {urls, [tags]}} % set
> UserTag table: {user, [tags]} % set
> TagUrls table: {tag, url} % bag
> TagUsers table: {tag, user} % bag
> Urlusers table: {url, user} %bag
> UrlTags table: {url, tag} %bag
> It is still a bit confusing where I'd use a set, a bag or an ordered_set
> but I think you got the whole picture.
> Any help?
> Thanks!
> --
> Silas
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171125/42ea3e72/attachment.htm>

More information about the erlang-questions mailing list