[ZODB-Dev] Advice needed
Dieter Maurer
dieter at handshake.de
Sat Jun 24 14:54:58 EDT 2006
Roché Compaan wrote at 2006-6-24 08:53 +0200:
> ...
>I am curious what other strategies besides QueueCatalog you employ?
Careful design with respect to the granularity and locality
of persistent objects:
Move groups of large and rarely used attributes out
into persistent subobjects.
Move groups of small and often modified attributes out
into persistent subobjects.
If some attributes are usually used together, keep
them in the same persistent subobject.
Don't group large randomly accessed mass data into the same
persistent object (as this stupid ZCatalog metadata implementation
does). Use persistent wrappers instead.
>Do
>you ever use multiple backends for your apps?
I have the tendency to keep everything in the ZODB -- but
I have colleagues fond of relational databases which do not let me...
Anyway: not even me would try to put the telephone book for Berlin
or even New York into the ZODB but would use a relational database...
>How do you decide that
>this data belongs in a relational backend? How structured must the data
>be, or how many records must be written how often?
I do not have a rigid criteria catalog...
Relational databases handle records with simple field types well.
Their world becomes quickly nasty when the fields are not
of simple type but structured or lists/sets or objects with interesting
behaviour (rather than pure data).
As I explained in a former message, relational databases are
also more efficient with searching (they filter on the server
rather than the client). Thus, the need for efficient searches
(over the datatypes supported by relational databases) indicates
the use of such a beast.
On the other hand, I would not put things into a relational database,
they cannot do anything with: e.g. blobs, complex data structures.
I would use the ZODB for this.
In between there is a large grey area where I tend to use the ZODB
and not the relational database.
>I find most data is highly structured (fixed schema), but this doesn't
>make me choose an RDMBS - the frequency of writes, concurrency and
>record volume does.
Sure, you are right!
As explained, relational databases exploit the highly structured
property while the ZODB ignores it. This may not be relevant, though,
if your application does not perform mass operations on them.
--
Dieter
More information about the ZODB-Dev
mailing list