[Tutor] ways to sync databases with Python and SQLite?

Che M pine508 at hotmail.com
Wed Sep 10 17:41:31 CEST 2008




> > 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.
> 
> Does it have to be SQLite? Many databases, but not SQLite, can run as
> a server. If both computers are on the same network, an easy way to
> keep them in sync would be for them both to share a single database.
> Both MySQL and PostgreSQL are free and work this way.

It doesn't have to be SQLite--that's just what I've been learning, and there
are things about it that strike me as good for my purposes.  But the app is
not intended to be used with a network.  What I am envisioning is
a personal application that one uses on one's home computer and work
computers, but in most cases they'd not be on the same network.  

As someone else suggested, I could just copy, via a flash drive, the most 
recently written-to SQLite database file to the other computer, but that seems 
likely to go wrong in that I or the user would inevitably, at some point, wind up 
erasing the whole database or copying the wrong direction, etc., and I don't want 
this  to require any user carefulness to maintain the two copies in sync.

> Web applications aren't necessarily that hard. For example you can get
> simple create/read/update/delete functionality pretty much for free
> with Django (in the admin and databrowse apps).
> http://www.djangobook.com/en/1.0/chapter06/
> http://www.djangoproject.com/documentation/databrowse/
> http://www.b-list.org/weblog/2007/nov/13/instant-sites/

I will look into that; thanks, Kent, for the references.

Che



_________________________________________________________________
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080910/b57f478e/attachment.htm>


More information about the Tutor mailing list