[Tutor] ways to sync databases with Python and SQLite?
Che M
pine508 at hotmail.com
Wed Sep 10 17:52:17 CEST 2008
> "Che M" <pine508 at hotmail.com> wrote in message
>
> > I'd like to get ideas about how I could extend the application so
> > that the
> > databases on each computer could be kept "synchronized"
>
> How do you intend to get the two computers to talk?
> Basically for any kind of synch both com,puters need to
> be able to compare notes. So the first question is what
> do we mean by synching here. Will it be over a network
> (the internet?)? Is it via a memory stick file transfer?
Considering that I want to lower the bar for the user to as
low/lazy as possible--and not require them to remember to transfer
the files with a flash drive or whatever--I'd think through the
internet would be the best. As I replied to Kent's reply, the two
computers would not be on a shared local network, though they
both would have internet access.
> > So, if anyone has ideas on ways to do this with Python
> > and Sqlite that are:
> > - fairly simple (I'm not a real programmer)
>
> If you are using Python and SQLite then I beg to differ :-)
I appreciate that, but I often feel like a fledgling photographer who
has use of a Hasselblad camera--great tools, not so great tool user! :)
(but thanks to this list and others and patience...getting there...)
> The key here is to keep a rolling log of what has changed.
> It can be a simple text file - which can be transferred between
> PCs and used to synch or it could be a database table.
> You then read both synch logs and eliminate conflicts then
> apply the merged set of changes. (A lot easier said than done!)
>
> You might want to try a dummy application with a single table
> and limited update opportunities to get the feel for this before
> trying it on the real data! And be sure to take copious backups
> while testing!
I will try something like this and then try to incorporate it with
Kent's suggestion of having a (reasonably?) simple way to access this log
file via a website using, maybe, Django. Keep in mind, my database
will mainly be just adding about 1-10 rows a day, very little UPDATES
(editing already-present rows), and will only have about 3-4 tables,
10 fields and hundreds (or at most a few thousands) of rows. It
is not a business application with a big and rapidly changing database,
and by definition only one change can happen at a time.
Thanks, Alan,
Che
_________________________________________________________________
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080910/26d0125f/attachment.htm>
More information about the Tutor
mailing list