[ZDP] Help wanted

Howard Clinton Shaw III shawh@sths.org
Fri, 21 May 1999 07:39:36 -0500

On Thu, 20 May 1999, Tom Deprez wrote:
> Hi Howard,
>  Hope you're better now. Still suffering with your health?
>  Q: Why would you use an SQL database for this? And not using the Zope
> structure. It's this what I'm interested of, the q'n of should I use an SQL
> database or just use Zope structure, helped with ZClasses... I know that it
> depends on what data you want to store. But this is sometimes not so
> obvious. Thinking on our knowledge base :
> Zope structure
> Base
>   ----- Topic 1
>   ----- Topic 2
>              --- SubTopic 1
>                          --- Item1
>                          --- Item2
> ....
> SQL structure
> Creating tables with index keys etc....
> The problem can be solved in two ways, but what is the best?

The reason that I would use SQL, Tom, is that as yet ZClasses haven't appeared
in a stable release, so I haven't seen them. I'm not comparing SQL to ZClasses
for this, I'm comparing to writing Python code to handle the items and more
Python code to do searching and sorting, etc, and DTML to access the Python. I
expect that with ZClasses and whatever component they mentioned was going to
make indexing easy, it might be quite possible to stay within Zope. But I
haven't seen them. 

As I said, when you first asked, I said nothing, because I hoped someone with
more experience on the murky development side of things would speak up and give
you a comparative response. In the absence of such, and since you seem to need
some info SOON, I jumped in with how I would do it with Zope and SQL.

> Tom.
> : Well, I was waiting for someone with experience with ZClasses to answer,
> but I
> : didn't see anything. I personally, having never seen ZClasses, would do
> this in
> : SQL, creating at least two tables, one for items, and one for the
> hierarchy.
> : The easiest way to do a hierarchy in SQL is to have a table with fields
> ID,
> : Desc, ParentID. Then you iterate, in your code, over the hierarchy by
> having an
> : SQL query like
> :
> _______________________________________________
> ZDP maillist  -  ZDP@zope.org
> http://www.zope.org/mailman/listinfo/zdp
Howard Clinton Shaw III - Grum
St. Thomas High School
#include "disclaimer.h"