[ZODB-Dev] Relational queries on zope obj db?

Christian Robottom Reis kiko@async.com.br
Fri, 1 Jun 2001 17:45:22 -0300 (BRT)


On Mon, 28 May 2001, Jeff Kowalczyk wrote:

> How does a zope developer select related items across folders from the
> object store? In effect, I'm asking what ZopeDB can do to feign
> relational SQL when it needs a select query on its objects, more
> extensive than a simple knock-out filter.

Indexes are what you're looking for. We've been discussing this over the
last weeks and I'm working on a StandaloneCatalog for fun, which uses the
Zope SearchIndex family. Apparently we have new Indexes coming out, so you
might want to wait and look into these.

> The problem domain may model perfectly in an ODB's folders/forms, but
> then the customer asks for the kind of report that would be a snap in
> SQL with any relational database, but is very difficult, or horrendously
> slow to do in the object database.

It's just plain true. Objects are cool for development and data entry, but
if you have data that fits into relational structures... use a relational
database. I'm using a mixed approach: I collect and use data in the OODB
in my day-to-day usage, but reports are generated from data that's
collected into an RDBMS every night, and I might even change that period.
It's a decent approach; productivity is much improved in my personal
opinion. You still have to flatten data out, though.

Take care,
--
/\/\ Christian Reis, Senior Engineer, Async Open Source, Brazil
~\/~ http://async.com.br/~kiko/ | [+55 16] 274 4311