If you're in need of an embedded database, Electron offers a variety of built-in options to choose from. These include LocalStorage (with more generous size limits than Chrome), WebSql, and IndexedDb.
Each of these databases has its own advantages. LocalStorage boasts a simple API but is limited in functionality, while IndexedDb is powerful but comes with a complex API.
To make things easier, I recommend using a library that abstracts away the complexities of these databases. Personally, I find PouchDb to be a great choice, especially if synchronization functionality is important to you.
You may also want to check out Nolan Lawson's blog, where he discusses databases and JavaScript topics. His post on how to think about databases is particularly insightful, as PouchDb utilizes IndexedDb as the default storage layer.
Other good alternatives include LocalForage and Dixie.js.
In my experience, I have successfully used PouchDb with Backbone by replacing the Backbone.sync
method with a PouchDb adapter. This allowed me to work with Backbone models just like I would in a traditional JavaScript application.