On 22 Oct 2009, at 3:51pm, Marian Aldenhoevel wrote:

> Is there a way to have sqlite3 detect the actual changes after I did a
> number of INSERT OR UPDATE statements? Using a trigger maybe?
>
> If so I could keep the intermediate storage nicely organized and still
> not incur a lot of read-and-then-update overhead to detect the  
> changes.
>
> The alternative is to just prepare it in the format that would be sent
> over the link, record that in a blob and check on changes on that  
> single
> item. Losing the ability to easily query the data to check it  
> manually.

If you have a central unchanged copy then you just need to keep a  
journal of all your UPDATE INSERT and DELETE commands.  When you want  
to bring the other copy up-to-date, just download your journal to the  
embedded device, and play back your journal against it's own copy of  
the database.

Of course, if the amount of data is small enough, and the device never  
makes changes to it, don't even bother to do that.  Just download a  
fresh copy of the database each time you want to update.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to