I have a need for an App which will hold some data in SQlite locally. This App will need to synchronize the data with remote MySQL database. I already have MySQL application running on the Apache/PHP server. I need to create a diplicate database in SQLite and then setup some way of synchronizing. there are 2 possible scenarions and I need to figure out which one to chhose.
1. I can create a PHP/SQL script to copy new/updated records from MySQL to SQLite on the server then allow to download SQLite.db to the phone (possibly through FTP)
2. Go record by record. Pull up a recordset from the remote MySQL , process it on the phone (updating) local phone database.
The SYNC will be done on demand so once a day to once a week is sufficient. No need for live continuous updates
Perhaps there is another scenario which I'm not aware of.
I would like to see your opinions on which method is:
- easier to implement (I'm rather B4A newbie)
- is more efficient for the user
- is more reliable
On top of that, as a second stage I would like to implement synchronization in opposite direction (from the phone to the MySQL remote server). Initially phone App will work in Read Only mode but in a second stage it should allow full record manipulations and updates.
since all tables in both databases will be identical, but I realize that the 2 databases are not compatybile, the question arises:
Is there any utility.library which will allow to convert MySQL -> SQlite which I can incorporate into web App or mobile App ?
Thank you for opinions and advice.
Arthur
1. I can create a PHP/SQL script to copy new/updated records from MySQL to SQLite on the server then allow to download SQLite.db to the phone (possibly through FTP)
2. Go record by record. Pull up a recordset from the remote MySQL , process it on the phone (updating) local phone database.
The SYNC will be done on demand so once a day to once a week is sufficient. No need for live continuous updates
Perhaps there is another scenario which I'm not aware of.
I would like to see your opinions on which method is:
- easier to implement (I'm rather B4A newbie)
- is more efficient for the user
- is more reliable
On top of that, as a second stage I would like to implement synchronization in opposite direction (from the phone to the MySQL remote server). Initially phone App will work in Read Only mode but in a second stage it should allow full record manipulations and updates.
since all tables in both databases will be identical, but I realize that the 2 databases are not compatybile, the question arises:
Is there any utility.library which will allow to convert MySQL -> SQlite which I can incorporate into web App or mobile App ?
Thank you for opinions and advice.
Arthur