[Zope] ZODB or MySQL for form data?

Chris Kratz chris.kratz at vistashare.com
Mon Sep 8 12:27:12 EDT 2003


Paul,

The answer to this question depends a lot on the kind of data that you are 
working with, what experience you have and the time you have to 
(re)implement.  Our experience has been to store 90-95% of our data in a 
backend db (postgres for us) and the rest is stored in zope.  This has worked 
exceptionally well for us.  Zope then contains most of our business logic and 
all presentation logic.  We have stayed away from storing everything in zope 
because some things that are easy in sql are still cumbersome using zope 
objects.  Complex selects with joins and mass updates, deletions come to 
mind.  This is especially true if you have large numbers of objects and 
changing complex select criteria.  Also, it has worked well for us to have 
this division of data and presentation when replicating data.  

But, you do pay a performance hit for each db hit.  Cacheing can be used in 
zope to help reduce this expense in certain cases.  On the other hand, 
replicating those pieces of data stored in zope between our dev and live 
servers has been a manual and somewhat painfull process for us.  Mainly 
because we have to be sure that when we push new presentation or logic, we 
don't overwrite data on the live server.  And someone has to remember to push 
the data pieces back to our dev server periodically.

So, my opinion is this.  One needs to weigh one's needs and the problem domain 
with the tools you have available to you.  If you are experienced in SQL and 
already have an application using sql extensively, you will have a working 
application much faster if you use zope as a presentation engine and keep 
your db in MySql.  As your familiarity increases, you may find that moving 
some or all of your app into zope might give you benefits that using a sql 
backend does not.  OO programming of course has some benefits that are 
difficult to replicate in sql (try doing trees in SQL for example).  The 
opposite of course is true as well. 

Oh, and by the way, welcome.  I migrated from PHP to zope a number of years 
back as well.  Good luck.

My $.02

-Chris

On Monday 08 September 2003 11:32 am, paulporter at buffalotalks.com wrote:
> I'm coming to Zope from PHP where my database is MySQL. However I am
> wanting to move to Zope and am trying to learn the correct way of working
> in this platform.  I know that I can connect to MySQL from Zope but from
> what I read it appears that the use of this feature is recommended only if
> one is wanting to use an existing database. Since I am starting a new Zope
> application, and will be creating new data files, is it better to use
> MySQL or ZODB to handle form data?
>
> I would really appreciate hearing from experienced Zope users on this
> matter.
>
> Paul
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )

-- 
Chris Kratz
Systems Analyst/Programmer
VistaShare LLC
www.vistashare.com




More information about the Zope mailing list