Something similar to XAMPP to use with Electron?

0

My idea is to create a local Crud with relational databases

The SQL Express program allows me to create a server and connect to an existing database.

Is there an alternative for Express itself to serve an SQL database? o Is there another module that creates a database on the server?

The closest thing I found is PostgreSQL . Is there any way to make it run inside Electron (is it an executable)?

Notes:

  • I've been using sql.js as a local database but I'm having problems with the number of records.

  • I have read about NoSQL databases as MongoDB and I do not like the fact that they do not have foreign keys.

  • asked by Rodrigo Martín 09.01.2017 в 00:19
    source

    1 answer

    1
      

    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.

        
    answered by 09.01.2017 в 02:19