5

I have a database in android app and i like to sync this sqlite db with mysql master in internet.

What is the best way to resolve this problem?

-dump in a file, upload file using web services -dump in a file, upload with ftp and then cron - any others?

Thankz

1 Answer 1

1

If its a one-time upload, use the dump-to-file aproach. Send it to server and parse it there.

If you have to keep syncing, then use a web-service api, and that too use as sparsely as possible - collect a lot of data and then sync, or on an as-needed basis. Focus to use as less data and battery as possible.

Sign up to request clarification or add additional context in comments.

2 Comments

An enhancement. Send deltas only. I wrote some code once which sent individual column changes using the row and column IDs with the intention of minimising bandwidth used (think 56k satellite uplink). As Aswin says, batch them.
Yes of course. Send only changed data. I usually mark rows which has not been sent with a dirty bit. When sending select only data which has dirty bit set. Once server responds saying it has been uploaded, unset the dirty bit. I dint have to use deltas of columns, because mostly data was added, not modified.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.