From: Ian B. <ia...@co...> - 2004-12-07 22:42:17
|
Oleg Broytmann wrote: > On Tue, Dec 07, 2004 at 10:32:37AM -0600, Ian Bicking wrote: > >>Yes, we can just get rid of it. I had moved it aside when I separated >>db backends into separate packages, but I hadn't tested it since -- he. > > > Removed at revision 463. > > >>and there's other better embedded databases. > > > In context of SQLObject - SQLite, of course. I don't have a word > against BerkeleyDB or GNU dbm, but in context of SQLObject I'd like to > recommend to use an established SQL environemnt for bsddb - MySQL! > Somewhere in a distant future I'd like to think about making > SQLObject-like API for non-SQL based stores (dbm, xml, csv), but they > should be implemented at much higher level - something like DBMObject > and XMLObject, not at the connection level. DBMConnection does something along these lines. I'd played with a couple other backends, including flat files. A CSV backend would certainly be possible. SQLBuilder includes the ability to bind its free variables and evaluate the expression (which is what DBMConnection did). This way you can use SQL-like queries without any SQL engine. Typically implemented with a linear search for every query, it's a little slow, but maybe workable for some use cases. Once you start adding indexing and query optimization, it starts making sense to think about simply moving it into a real database. I think dbm wasn't very interesting, because no one would ever happen to have a properly-formatted dbm file laying around. CSV or XML files would be more interesting. It'll be difficult if the format is extensible (like mbox, with extensible headers), or hierarchical (like many XML uses), but there's probably a class of cases where it is useful even for those formats. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |