Re: DBM Compatibility layer

From: Date: Thu, 18 Apr 2002 18:42:28 +0000
Subject: Re: DBM Compatibility layer
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5653@lists.php.net to get a copy of this message
On Thu, 18 Apr 2002, Martin Jansen wrote: > On Thu, 18 Apr 2002 13:00:22 -0500 (CDT), Brent Cook wrote: > > > While I don't have it completely up to PEAR standards yet, I would like > >your opinions on a DBM compatibility layer for PEAR. What I'm proposing is > >something to go between the dbm functions in PEAR and an application to > >smooth out inconsistencies between DBM implementations, sort of like DB > >does for SQL databases but more like the anydbm module in Python > >http://www.python.org/doc/current/lib/module-anydbm.html > > Do you think that it could API-wise fit in the structure of > PEAR::DB? IMO integrating the code into PEAR::DB would be much > nicer than making it an independent package. > > - Martin It would if there was a such thing as a query, a column, etc in a DBM-style database. DBM is a very simple API, it just supports keys and values. So, insert is insert ($key, $value);. You can store more complex things by using serialize, deserialize. This is lower-level than a SQL database. My motivation here is to eventually provide something between a raw DBM interface and DB. Sometimes, you need to store a medium amount of data; more than is practical with a CSV file, but less than is warranted to setup a full-blown SQL database. Does anyone else run into this problem? I'm reminded of an ASP programmer I knew that was setting up a simple authentication scheme. He wanted to setup an whole Access database and server just to authenticate 30 or so users. - Brent

« previous php.pear.dev (#5653) next »