[Zope] Re: Understand ZODB Query?

Godefroid Chapelle gotcha@swing.be
Tue, 11 Mar 2003 14:47:25 +0100


Heri wrote:
> Hi,
>  
> I'm starting to develop a zope products and I'm still confused on how to 
> use ZODB.
>  
> My current application development is using RDBMS concept such as 
> following samples:
>  
> employee table:
> Row   First Name     Last Name  Age
> ===   ==========   =========  ===
> 1     Bob                  McBob         42
> 2     John                Johnson        24
> 3     Steve              Smith             38
>  
>  
> - I can easily perform SQL statement to lookup for some information such 
> as, total employee, who are above 30 years old, and who has the Lastname 
> of 'Smith'.
> - I can easily retrieve information from multiple tables and combine it 
> as data objects.
>  
> But how can I do this in ZODB?
>  
> I was looking at 
> http://www.zope.org/Documentation/Books/ZDG/current/index_html
> but it just tell me briefly how to store objects and simple retrieval.
> I need to do complex queries or perform some transaction.
>  
> Can anyone help me the way to query data in ZODB?
>  
> thanks,
> Heri
ZODB has no query language.
But by using ZCatalog indexing mechanism and coupling it to Python code, 
you can write your own queries for data stored in ZODB.

Please others, correct my wording where incomplete/incorrect