[Zope] New to Zope and ZODB

Stuart 'Zen' Bishop zen@cs.rmit.edu.au
Wed, 13 Oct 1999 13:04:10 +1000 (EST)


On Tue, 12 Oct 1999, Willie Peloquin wrote:

> I am still a Zope newbie and I have a question for the gurus. I want to
> create a simple database with 100 or so entries, I know that I could use an
> external rdbms and polulate it an then read it via SQL. I would like to use
> ZODB rather than an external db. I have not found any documentation on doing
> such a thing.

ZCatalog might be useful to you. For example, create a ZClass to represent
one record of your data. This ZClass should inherit from CatalogAware.
A ZCatalog object can then handle all the indexing and searching, returning
lists of records matching your search criteria. I'm looking at this
approach for a number of systems here:

    Documentation system (ZClass contains text, keywords, summary, category
    etc. Searching is done using a ZCatalog)

    Problem Tracking System (Container, Queue, Area, Job and Slip classes.
    Browsing is done using ZCatalog rather than just traversing subfolders
    to avoid having Zope load up the actual objects)

    Inventory and Booking systems (Object listing asset number etc., Booking
    giving time, location, who etc. Use ZCatalog to build booking sheets
    and check for collisions before allowing booking to be entered)

If these tasks sound similar to what you want, check out the ZClass tutorial
(First chapter of the Developers guide on zope.org) and the ZCatalog How-To.
You might also prefer to code your custom objects in Python rather than using
ZClasses (but there is little documentation I know of if you want to take
this approach).

 ___
   //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
  // E N  Senior Systems Alchemist      Play: zen@shangri-la.dropbear.id.au
 //__     Computer Science, RMIT 	 WWW: http://www.cs.rmit.edu.au/~zen