My idea is to create a local CRUD with a relational database
Electron is an agnostic platform, you can use SQLite, PostgreSQL and MySQL, even MongoDB. A clear example is SQLElectron , which can connect to PostgreSQL and MySQL.
If you want an embeded database, you can use SQLite, the package I recommend is sqlite . SQLite allows you to store large amounts of data and consult many standard SQL functions. The main one against it is that it is not good for concurrence due to the fact that supports only one transaction at a time , that is to say , if a transaction is taking place another one can not be executed simultaneously since the database will be locked until the transaction ends; however, in small applications such as CRUDs or mobile, it is a pretty good option.
I do not like the fact that MongoDB does not have a foreign key.
It does not have to have it since MongoDB is a NoSQL database oriented to documents. However, you can have nested documents or references between them (associations).
There are document-oriented database implementations for embedded use, such as minimongo . The fact of choosing between one or another type of database is entirely design; If data integrity is paramount and must be well structured and standardized, then a SQL database would be the best choice; If, on the other hand, it is not a requirement that the data be structured, but if the speed of communication is very fast, then a NoSQL database such as MongoDB will be the best option. As you try alternatives, you will realize the pros and cons.