[Zope] ZODB vs SQL, ZTables
Michel Pelletier
michel@digicool.com
Mon, 7 Jun 1999 12:15:50 -0400
> -----Original Message-----
> From: Jordan B. Baker [mailto:jbb@spyderlab.com]
> Sent: Monday, June 07, 1999 12:20 PM
> To: zope@zope.org
> Subject: [Zope] ZODB vs SQL, ZTables
>
>
> hi zopesters:
>
> I am designing an application where I'd like use the ZODB as
> the primary
> storage and the objects being instances of ZClasses.
>
> I'd like to navigate through them using a hierarchal category system.
>
> Now, I assume that once I have this I can also provide other ways to
> traverse the data by building indexes. I realize this isn't quite
> documented yet and its not totally importart atm because the
> dataset size
> is small enough, but I'd like allow this app. to scale.
>
> I'm not sure if building indexes is the only way to get
> another 'view' of
> the data stored in the ZODB. I could write an exthernal
> method to query
> using the 'slow' objectValues() method, I suppose.
>
> The questions I have are:
>
> 1) Would I be re-inventing the wheel here? Can ZTables instantiate
> ZClasses? The reason I like the ZClasses is because I'd like
> to write my
> business logic in Python. I suppose I could do this with External
> methods.
>
ZTables return an result 'object' called a 'brain'. This object is
instanciated on the fly when you make queries. If you define your own
type of brain, then you can have your own types of objects. I don't see
any reason why this object couldn't be a ZClass, but currently there is
no mechanism to hook the two together through the ZClass, there would
have to be some python involved.
> 2) I realize the indexing system isn't well documented at
> this point, but
> if you can figure out the system is it usable? :)
>
It's very usable. I'm working on some documentation for it right now,
but it might be lower level than you think. What you might want to wait
for is the Catalog, whose purpose is to do exactly what you want,
catalog and index Zope objects.
> I'm just struggling a bit with the concepts of going
> completely OO instead
> of storing my data in a SQL database.
>
There are benefits to using SQL, and there are benefits to using
objects. You have to weigh these things when elaborating your design.
if you think your system is very object oriented, or very relational, or
a hybrid of the two.
> Has anyone tackled any of these issues? Was it worth it?
>
We are tackling it internally, whether it was worth it or not is yet to
be seen. ;) (give us lots of money, and it's worth it) The catalog is
designed to do almost exactly what your looking for. It's unclear at
the moment what exactly will get open sourced as a the 'catalog' since
the catalog consists of several layers of components at the moment.
Chances are there will be no managment interface (maybe a minimal one),
just a DTML API which you can use to search or manipulate the catalog.
-Michel
> Thanks guys,
>
> -------
> Jordan B. Baker -- jbb@spyderlab.com
> weaving the web @ http://www.spyderlab.com
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>