[Tutor] ways to sync databases with Python and SQLite?
flaxeater at gmail.com
Wed Sep 10 17:57:24 CEST 2008
One way to work around this and still use SQLight is to put the database on
a shared drive. SQLight does table locking, or is it file locking. Anyways
conflicts will be very minimal to non-existant with only two clients as most
operations will complete in microseconds. The SQLight website even says
this is a fine practice.
However synchronizing two separeatly running databases is a very hard task,
and is very very easy to get wrong.
However if all that one does is read and does no updates or deletes then you
could just copy the database over to the 'client' user.
On Tue, Sep 9, 2008 at 6:56 PM, Che M <pine508 at hotmail.com> wrote:
> Hi list,
> I have been trying to create a small desktop application with Python
> that uses a small SQLite database. Recently I've got use of a 2nd computer
> (for my job) and have thought now about using the app on that one as well.
> I'd like to get ideas about how I could extend the application so that the
> databases on each computer could be kept "synchronized" (not sure that is
> the right term here); that is, each new change on either computer would
> be updated on the other computer(s), given a bit of help from the user.
> I know that, for example, the Chandler PIM has a "hub" that allows sync'ing
> multiple computers (though I was surprised to see it is a 8 step process
> for the user:
> (I realize a good way to do all of this is entirely as a web service, but
> that is beyond
> my abilities, and I am trying to just complete a desktop app before
> learning much of that)
> So, if anyone has ideas on ways to do this with Python and Sqlite that are:
> - fairly simple (I'm not a real programmer)
> - not laborious for the user to do (so that they actually keep the two dbs
> in sync)
> I'd love to hear about it.
> Stay up to date on your PC, the Web, and your mobile phone with Windows
> Live. See Now<http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/>
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor