kostonstyle

kostonstyle

Mnesia vs others

Hi all
Ecto supports many database except Mnesia. My question is, would be a good choice to use Mnesia instead other database with Phoenix framework?

Thanks

Most Liked

hubertlepicki

hubertlepicki

oh, Mnesia is very much different sort of database than what you would usually expect from relational database. I do not think I would use as a replacement for SQL database.

SQL is generally really good for performing queries that span across table, do reporting etc. With Mnesia you will need to do slightly more legwork, and possibly process some data in your Elixir/Erlang application.

I think good use cases are stuff like storing data that needs to be accessed throughout nodes of cluster. Possibly some core data in the system that needs to be shared/accessed in performant manner. That would be use in addition to SQL database, not instead of.

We have used Mnesia for a toy project where we store statistics that are gathered in time intervals. The choice was, however, made not as replacement to SQL database, but because it was fairly easy to integrate that with an app, and allowed us to get rid of external database dependency. If we had multiple users, accounts, etc. we would not use Mnesia.

Hope that helps a bit.

AstonJ

AstonJ

Check out this thread re other DBs - some good discussion there (tho I don’t think Mnesia is mentioned)…

Where Next?

Popular in Discussions Top

mbenatti
Following https://github.com/tbrand/which_is_the_fastest |> https://raw.githubusercontent.com/tbrand/which_is_the_fastest/master/imgs...
New
rower687
Hi all, I’ve been reading a lot about the “let it crash” term and how supervising processes and the whole messaging passing make an elixi...
New
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New
opsb
We’re considering our architecture from a viewpoint of scaling our traffic heavily over the next 6 months. Our current deployment is runn...
New
AstonJ
Can you believe the first professionally published Elixir book was published just 8 years ago? Since then I think we’ve seen more books f...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New

We're in Beta

About us Mission Statement