DB suggestions for Electron Online/Offline app


Hello there!

I’m researching to create an app that will use an online DB, but I need it to also work offline when a connection to the Db server is not available.

I have look into CouchDB and PouchDB and they seem to fit the bill. Are there any other alternatives before committing to that DB? Do you have success stories with these DBs?




Although I’ve never tried CouchDB or PouchDB, I’ve been using nedb and I’ve had no issues with it whatsoever. I would recommend it. Its gotta an interface similar to that of the popular Nodejs Mongodb driver.

I’ve created the following project using it.


From my experience working with online databases and their offline alternatives, I would recommend you go with PouchDB. The reason is that you can easily sync your local database with the remote one, CouchDB works with revisions, so it’ll only download the diff instead of the whole database when updating.

If bandwidth isn’t a problem for you and the size of the database is small, You could use the node mysql or mongo drivers and connect to a remote database and cache their outputs, in case the network is down, you could use their outputs which is not a difficult task. You could store their results in the localStorage or if you need something performant, you could use the embedded leveldb or sqlite for node