What is the best NoSQL database for Electron App?


I have done a little reasearch, but I haven’t found something like SQLite that recommended almost by everyone.
The choice of a NoSQL database seems have no dominant one.
So what NoSQL database do you think is the best choice for an Electron App?



IndexedDB is built-in and can be used with a wrapper like Dexie or as a backend for PouchDB.


definitely MongoDB


Is MongoDB able to be embedded in Electron or does it require the end user to install it separately?


IMHO the choice of database is largely unrelated to your choice of front-end technology.

The higher-order bits on choosing a database really depend on your use case(s):

  • The nature of your database and synchronization requirements will inform your choice between relational (i.e. SQL-style) or non-relational (NoSQL, etc.) databases. As with so many things, both styles of databases have their sweet spots and core competencies and their downsides. Remaining items assume NoSQL makes sense.
  • If you can rely on a network connection (and you can live with the license terms), MongoDB is a great choice.
  • If your app may operate at times with no connection to your central database, you may want to look at other options such as CouchDB or some of its lighter-weight clients like PouchDB.


Your SQL-based example was Sqlite, so I assume you want something light which will run on the user’s local system. On that note, MongoDB is a great and powerful NoSQL database, but probably overkill – the name “Mongo” comes from the word “humongous,” and its intended use-case is more like the use-cases for MySQL or Postgres than Sqlite.

IndexedDB or Redis are very light-weight – i.e., the installed packages are very small, the APIs are going to be simpler to work with, and won’t take much of the client’s CPU or RAM to use. I would try glancing through the documentation for both and making a trivial database. Add, change, and delete some database entries, and search inside it. See which one you like working with better.


LinvoDB3 was built just for this purpose:

And is being used in production by several applications.

It utilizes LevelUp thus supports many backends. MedeaDB is supposed to have comprehensive multi-platform when utilized with node-webkit or electron.

I would suggest this for situations where you need to handle thousands or more records locally.


Looks like a promising choice, thank you


Also ForerunnerDB makes a lot of progress lately (http://www.forerunnerdb.com/index.html). It mimicks the API of MongoDB and might be easy to integrate into your Electron app as well.


If you are looking for a database which can sync with the server and has a simple, mongoose-like api, you should try RxDB.


While the drivers are Apache licensed, MongoDB itself is AGPL licensed so there may be issues there if you are bundling it and not releasing your project under GPL.


You may want to look at LokiJs. It is faster then NeDB and ForerunnerDb, has persistence adapters, and is easily extended.