[Zope] When to use a relational database

Jaroslav Lukesh lukesh at seznam.cz
Thu Feb 7 15:38:56 EST 2008


----- Original Message ----- 
From: "Dieter Maurer" <dieter at handshake.de>
> quizzical wrote at 2008-2-6 16:03 -0800:
>> ...
>>Apologies if this is a dumb question, I have had a good look through the
>>archives and on the web. My question is basically about how to design a
>>website. I really like the ease with which you can build applications in
>>zope but I often see comments implying that in order to scale well one may
>>want to use a backend relational datbase. I have also seen several 
>>comments
>>to the effect that one should keep the state of a user session out of the
>>ZODB.
>>
>>I am slightly confused by this, I can't find any information which would
>>help me decide what data would be better off in a relational database.
>
> A relational database is good when you have large amounts
> of strictly structured data -- e.g. millions of user records
> where each user record has a fews fields with atomic datatypes.

For example pricelists etc. But you need to make join with ZODB - with 
hyperlink (URL1) or ZODB folder object property

> The ZODB is good when you have weakly structured or unstructured data
> and your write rate is not too high.

ZODB effectivity is very high at tree structured data, as catalogues etc

I use ZODB as catalogue container and RDB as pricelist at one travel agency 
site. If you want to know which, I will send you ULR to private mail and 
make some source view method for you. But it is written in pure DTML, few 
computing-intensive parts are in Python (tree structure, etc) and ZSQL to 
MSSQL. No sql-inject is possible thanks to DTML ;-)

Near all other my webs are pure ZODB and uses SQL to store forms data only.

Pure SQL driven web I use only for our own ERP, at ZODB are only DTML and 
bunch of ZSQL.

> The ZODB uses an almost self describing format. Therefore, it can
> store virtually everything, without any data model fixed beforehand.
> However, this leads to high redundancy and efficiency loss.


It is possible to use some products like linux symlink to avoid data 
duplicates.

Regards, JL. 



More information about the Zope mailing list