[Zope] zope design pattern type question

Luciano Ramalho luciano@hiper.com.br
Tue, 26 Jun 2001 18:12:03 -0300


Gary Poster wrote:
> Finally, can I use zcatalog with the field indexing to speed up looking for
> the authors in the book collection, or is zcatalog really only for text?

That works very well. The Field index type is what you need to quickly
fetch related objects. We've been implementing many to many
relationships like this example: instances of Book store references to
its Authors. Instances if Author know nothing about books, but a
convenently indexed Catalog lists the Books by one Author whenever that
info is needed.

We have re-implemented a 25-table Oracle-based DVD movie catalog in ZODB
with 8 ZClasses and 4 Catalogs. It was a great pleasure to drop all the 
link tables that existed only to satisfy the limitations of a relational
database regarding many to many relationships. 

We are extremely happy with that refactoring (the original site was also
done in Zope; the difference was only where the entities where stored). 
The pure object oriented site became much easier to maintain and extend.
And performance did not suffer at all; it may even have improved 
(although we have no hard data to support that, our fears that a pure 
ZODB solution could be noticeably slower proved unfounded). 

Regards,

Luciano