PostgreSQL

PostgreSQL is the best of the databases.  Really very good.  None of my professional colleagues have any complaints about it. But it lacks four much needed concepts, the persistent graph, pickling trees, dynamic schemas and application specific concurrency control.  These are all needed to minimize develpopment and response time.  And of courses don't even think of trying to include PostrgeSQL in a client application such as Diaspora.  But you could easily include ZODB in a python client application.

Persistent Graph

A persistent graph is a wonderful abstraction for simplfying software development.  Most developers develop on top a database.  Either they actively read and write from the databse, or they use an ORM, and that introduces a bunch of other problems.  I don't.  I do computations on a graph of python objects sending messages to each other.  I am barely aware that somewhere objects are being read and written to disk.  This is a huge simplificatoin in conceptual complexity.   

Pickling

ZODB uses a python technique called pickling.   Just take a piece of the object graph, and squash it into a jar, and save it.  Pickling allows for faster load times.  Google has shown that the web puts a huge premium on load times.  I deal with this by figuring out a tree of objects that display as a page, and load that entire tree in one object references.  In PrivaCV I load a person (11 objects) in two object references.  In Zopache.com I load the whole site of 120 objects (5 classes) as a single object reference.  One could Pickle objects in PostgreSQL, but then one looses the ability to access their fields outside of Python.   And of course modifying the graph is so easy in ZODB. 

Application Specific Consistency Control

And finally we get to application specific concurrency control.  Historically selling airline tickets had to be perfectly consistent.  Two peole could not buy the same seat.  Now applications can define their consistency requirements.  Even in the airline example, the list of tickets can be slightly out of date, only occasionally will a person go to buy a ticket and fine them all sold out.  PostgreSQL is very much based on the computer science notion of perfect consistency.  The ZODB mailing list is busy talking about delayed updates to the catalog, after the transaction has completed.  

Conclusion

To write this software I had to make small changes to the ZODB. No problem it is all written in Python.  And easy to include it in a python client applications. 

To summarize.  There are many use cases where databases make sense.  If that is your situation, then PostgresQL is a great choice.  But if you are only developing your application, then ZODB gives you a wonderful platform to build on.  

And of course there are many situations where PostgresQL is better than ZODB, but others have ritten about that.  




I invite you to Register and then link to your own blog postings and software packages..

Powered by Zopache, Grok, Zope and ZODB

Robots Crawl This