vendredi 12 février 2016

MySQL to Sqlite sync from PHP to mobile app (iOS/Android)

To sync a mysql database with sqlite database using a PHP web app, I am going to

  1. create a "view" mirror of SQLITE tables in MySQL
  2. select changed data on mirror "view" in MySQL
  3. use mysqldump to dump the sql for sqlite and save it in a file on server
  4. download that file from mobile
  5. import data directly to sqlite

another approach would be not using a middle "view" table and dump data using "SELECT" or mysqldump and parse it on the device or server, so it would be readable by sqlite

is there any disadvantages in creating a mirror "view" for each table that SQLITE needs on client devices? or is there another 'standard 'way to sync these 2 which i did not find on the internet?

Aucun commentaire:

Enregistrer un commentaire