Which NoSql db is best to use with GraphQL and Elixir?

I want to use GraphQL with elixir and I am not sure which NoSQL DB is best for me to use in this project like MongoDB OR Cassandra?

Why you want to use NoSQL DB at all? Is there any technical reason? Assuming by your question - no, then use PostgreSQL.

1 Like

I love nosql, I do not love sql, do you have any idea about my question

1 Like

I use ArangoDB with success, but it has it’s own schema and API, no GraphQL

did you use cassandra

I cant tell you what to use, except Postgres, but make sure that whatever you use, there is a fairly maintained ecto adapter.

1 Like

why you orefer to use postgres, any reason?

I have been an SQL guy for over 15 years. But not only that, I have yet to find a situation where Postgres have fallen short. Also, if you are fairly new to the Phoenix eco system, all guides pretty much assumes that you are using postgres.

3 Likes

PostgreSQL is the most developer friendly free SQL database. The other choice (MySQL/MariaDB) is more optimized for ops.

It is very hard to recommend anything in NoSQL unless you provide more specifics requirements. Think of it this way: All human are alike, but non-human can be anything.

ok tnx so much, Why u prefer postrege over other sql db, just qurious about it :slight_smile:

where I will use no sql, in which situations u recommend?

This is an Elixir forum, so naturally I’d recommend Mnesia, which is built right in Erlang/OTP. Please read the official overview to find out more.

I’d highly recommend against making any technical judgement based solely on anecdote information you gathered from random places.

When starting project? I would never use NoSQL right now, because in most cases it makes no sense and limits your design choices. You can fit document DB (like MongoDB) by using JSON(B), you can have KV store by having table in form of {key, value}, you can have graph DB by using some CTEs and 2 tables. Additionally Postgres + extensions provide you with more functionalities:

  • message queue via LISTEN/NOTIFY
  • TSDB via Timescale or other plugins
  • partial support for columnar DB, but there are also other projects that use the Postgres wire protocol for columnar DBs (ClickHouse)
  • full-text search via tsvectors
  • GIS via PostGIS

So almost everything I need I have built-in or within my grasp. So I can reduce amount of the moving parts and add more dependencies only when I will know for sure that I will need them. Until then I can have everything in single place.

6 Likes

tnx so much for ur answer, I get it :slight_smile:

So far for me Mnesia looks like Redis/memcache: useful for storing not large amount of data in memory, am I right? I’m a bit new to the Erlang/Elixir ecosystem, so your opinion as an expert is appreciated.