[Mono-list] Tree data storage on BerkeleyDB

Rodrigo Moya rodrigo@ximian.com
21 Sep 2002 11:47:47 +0200


On Fri, 2002-09-20 at 20:50, Everaldo Canuto wrote:
> >
> >
> >why do you need 2 keys? I think one for the path of the configuration
> >entry is enough.
> >  
> >
> I need to recover all child keys of key, example:
> 
> /Software/Mono
> /Software/Mono/mcs
> /Software/Mono/nant
> /Software/Microsoft/
> /Software/Microsoft/Windows
> /Software/Microsoft/ASP.NET
> 
> I need to recover all /Software/Mono child's but theres no function on 
> berkeley DB.
> I think abot Berkeley DB is not  a better option to do this.
>
then, maybe you might consider using SQLite
(http://www.hwaci.com/sw/sqlite/), which is based on gdbm and offers a
SQL engine quite powerful, that is, it simulates a real database with
tables and multiple fields per table on top of the gdbm arch, which is
similar to Berkeley DB's.

You could then just issue 'SELECT * FROM keys WHERE key LIKE
'/software/mono%'

Although, as some other people suggested, I would do the stuff
pluggable, so that we can write several backends (SQLite/bdb, GConf,
LDAP, NIS, etc) and have people choose the one they prefer.

cheers
-- 
Rodrigo Moya <rodrigo@ximian.com>