I am developing an application with Ionic Framework and NodeJS and I have some doubts when choosing the databases to use.
I explain the funcionality I want for my application to see if you can help me.
- There is a database on a Nodejs server. Currently it is implemented in MySQL (but i can change it if it's necessary).
- This database stores data from many users with related information about them, and other information that may also be used by these users.
- The mobile application developed in Ionic, is designed to work offline (Except for the first app start that will be connected to internet and remote server).
- In the initial installation of the application and its first startup, it downloads to a local database (actually SQLite but i can change it) of the device, all the user information (only the user's information logged in the application), and other generic information that the user will use at later times from the remote database.
- Once the app is updated with the remote data, the app always work with local data.
- The user uses the application and will update the local database with the actions performed in the app.
- Once the user finishes the use of the app (perhaps several days or weeks, because the device is rented for days), the remote database need to be updated with the local data of the device and delete all local information (To prepare it for a new use from another user)
Is there a database that allows you to easily perform this synchronization by choosing which local tables to update to the remote server?
I have read something about PouchDB but I do not know if it is exactly what I need, or I simply have to do the dump with a custom process that I develop and insert it into the remote database.