[sugar] Fwd: Database Activity

Tomeu Vizoso tomeu at tomeuvizoso.net
Mon Mar 10 05:03:00 EDT 2008


Sorry, replied just to 7150 by mistake.

Chris, you may find this interesting for your dictionary activity.

Tomeu

---------- Forwarded message ----------
From: Tomeu Vizoso <tomeu at tomeuvizoso.net>
Date: Sun, Mar 9, 2008 at 3:55 PM
Subject: Re: [sugar] Database Activity
To: 7150 <linux.1 at litenverden.com>


On Sun, Mar 9, 2008 at 1:58 PM, 7150 <linux.1 at litenverden.com> wrote:
 > Tomeu Vizoso wrote:
 >  <snip>
 >  > The DS used sqlite to store metadata, but stopped doing that quite a
 >  > while ago. I think the News Reader activity also use(d) pysqlite.
 >  >
 >  > The dependencies on pysqlite2 were added when we used python2.4.

>  <snip>
 >  If not SQLite, do you have a suggestion on what to use to store a flat
 >  file? I am trying to create a simple translation dictionary.

 Oh, I wasn't telling you not to use sqlite, just was answering
 Michael's question.

 If you really just want to store a flat file, then use a flat file.

 If you want to find words more efficiently, then you could use dbm or pysqlite.

 If you want to perform full text search, then you could use the
 fulltext search capabilities of sqlite, or xapian or create your own
 structures with dbm.

 http://docs.python.org/lib/module-sqlite3.html
 http://xapian.org/docs/bindings/python/
 http://code.google.com/p/xappy/
 http://docs.python.org/lib/module-dbm.html

 dbm and sqlite are definitely part of the platform (you can expect to
 find them in future releases). Xapian I'm not so sure, as it is
 currently used only by the DataStore and it is scheduled to be
 reviewed, thus exist some possibility that xapian stop being in the
 images. But even in that case, you could ship xapian inside your
 activity bundle if you really want to use it (or lucene, or other full
 text search engines).

 Tomeu


More information about the Sugar mailing list