tags:

views:

12

answers:

1

The question is relatively simple.

I have copies of a database that run on user computers in MySql and I have a server database that aggregates the information that is stored in this client database when the user wants to 'Sync' that information with the server.

Call the big Server databse server call the databse stored on the computers client

So I am going to be sending information from the client to the server and from the server to the client. Is there any reason why I would not want to send information from the client to the server as a file with all the sql statements that have been executed on the client.

So lets say that in the client I make some updates, inserts, and deletes. I record all those statements that get processed and send them up. Like a mysql dump.

I guess my only concern is problems with bringing information back down that has been modified already on the tablet but I will have to deal with this no matter how I send the information.

A: 

Is there any reason why I would not want to send information from the client to the server as a file with all the sql statements that have been executed on the client.

What if I put a nice DROP TABLE table or similar in the SQL statement? You won't be able to avoid that unless you have some sort of filter before everything goes into your master database. But I would not recommend something like that.

DrColossos
so would a better approach be something along the lines of making a job file, sending that file to the server, allowing it to parse through it and execute all the queries it needs to?
Felipe
As George Stocker suggested, a singe database would be a better way of doing this. If online connection is not always possible, save the commands in the client app and when it gets online, send everything to an API that is able to process the incomming data and sync the database accordingly.
DrColossos