Re: Database in memory

2007-04-10 Thread Nicko
On Apr 10, 1:10 pm, "Nicko" <[EMAIL PROTECTED]> wrote: > If you expect to do exact-match look-up where the keys are not unique > then build a dictionary containing 'set' objects which are the sets of > records which have the given key. This lets you neatly find the > intersection of selections on m

Re: Database in memory

2007-04-10 Thread Nicko
Jim wrote: > I have an application that will maintain an in-memory database in the > form of a list of lists. Does anyone know of a way to search for and > retreive "records" from such a structure? The answer very much depends on the manner in which you want to do the look-up. If you only need t

Re: Database in memory

2007-04-10 Thread Hendrik van Rooyen
"Jeremy Sanders" [EMAIL PROTECTED] > wrote: > Dictionaries are one of the most useful things in Python. Make sure you know > how to take adavantage of them... +1 for QOTW - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Database in memory

2007-04-09 Thread Travis Oliphant
Jim wrote: > I have an application that will maintain an in-memory database in the > form of a list of lists. Does anyone know of a way to search for and > retreive "records" from such a structure? > Actually, the new NumPy can work as a very-good fast and efficient simple in-memory database (o

Re: Database in memory

2007-04-09 Thread Jeremy Sanders
Jim wrote: > I have an application that will maintain an in-memory database in the > form of a list of lists. Does anyone know of a way to search for and > retreive "records" from such a structure? The dictionary is the obvious way to index things: # items consist of name and age data = [ ['fr

Re: Database in memory

2007-04-09 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Jim wrote: > I have an application that will maintain an in-memory database in the > form of a list of lists. Does anyone know of a way to search for and > retreive "records" from such a structure? Scan the list of lists with a ``for`` loop. Or build indexes with diction

Re: Database in memory

2007-04-09 Thread Gabriel Genellina
En Mon, 09 Apr 2007 10:19:12 -0300, Jim <[EMAIL PROTECTED]> escribió: > I have an application that will maintain an in-memory database in the > form of a list of lists. Does anyone know of a way to search for and > retreive "records" from such a structure? Why not a true database? SQLite can han

Database in memory

2007-04-09 Thread Jim
I have an application that will maintain an in-memory database in the form of a list of lists. Does anyone know of a way to search for and retreive "records" from such a structure? Many thanks, bootkey -- http://mail.python.org/mailman/listinfo/python-list