Databases and python

Dan Stromberg strombrg at dcs.nac.uci.edu
Thu Feb 16 22:19:01 EST 2006


On Thu, 16 Feb 2006 10:09:42 +0100, Rene Pijlman wrote:

> Dan Stromberg:
>>is there a python database interface that would allow me to define a 
>>-lot- of tables?  Like, each word becomes a table, and then the fields 
>>in that table are just the filenames that contained that word.
> 
> Give ZODB a try. 
> http://www.zope.org/Wikis/ZODB/FrontPage
> http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html

Aside from object persistence, what would this add for me?

Is each object saved in a separate file, or are they bunched together into
one or more files?

> My first attempt would be: a BTree with the word as key, and a 'list of
> filenames' as value.
> http://www.zope.org/Wikis/ZODB/FrontPage/guide/node6.html#SECTION000630000000000000000

This is basically what I'm doing now, except the most recently used "lists
of filenames" are kept in RAM to avoid going from "on disk string" to "in
memory list" to "on disk string" quite as much.




More information about the Python-list mailing list