Home arrow Zope arrow Page 2 - Zope And MySQL

Making The Connection - Zope

It might seem intimidating, but hooking Zope up to a MySQL database is easier than you think. And once you've got the two talking nice to each other, it becomes even simpler to create dynamic, Zope-based Web applications. Take a look.

TABLE OF CONTENTS:
  1. Zope And MySQL
  2. Making The Connection
  3. Adapting To The Environment
  4. The Magic Of The Movies
  5. Visiting The Box Office
  6. Adding Things Up
  7. Submitting To The King
  8. Erasing The Past
  9. Of Methods And Madness
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 27
April 10, 2002

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
First up, that all-important question: why? Why on earth would you want to connect your Zope system to an external database, especially since Zope already comes with its own, very cool ZODB?

There are a couple of reasons why you might want to do this:

First, if your data is already in an existing RDBMS, you're usually going to find it tedious and time-consuming to migrate it all to to Zope's own database. It's far easier (not to mention less disruptive to your users) to leave your data where it is, and simply get Zope to talk to your existing RDBMS so that you can access the data within it in a simple, transparent manner.

Second, Zope's own database is not really meant to perform the same tasks as a full-fledged RDBMS. The ZODB is a very powerful object database which keeps track of all the different objects you use in Zope, and it comes with some very neat transaction and versioning features. However, it's optimized to read data, not write it, and so INSERT and UPDATE queries tend to be sub-optimal on this database.

For a more detailed discussion of why you might prefer an SQL database over the ZODB, take a look at http://www.zope.org/Members/anthony/sql_vs_ZODB

It should be noted at this stage that, in addition to the ZODB, Zope does come with a small, SQL-compliant RDBMS named Gadfly, which can be used if your requirements aren't too complex. If, however, you're dealing with large record sets or complex queries, you will probably find Gadfly too slow and inefficient for your needs, and you will need to explore the possibility of connecting Zope to a more professional and full-featured RDBMS.

 
 
>>> More Zope Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ZOPE ARTICLES

- Creating Zope Products
- Plone Content Types With Archetypes
- Flat User Management in Zope
- Creating Basic Zope Applications
- Getting started with Zope for Linux and Sola...
- ZPT Basics (part 4)
- ZPT Basics (part 3)
- ZPT Basics (part 2)
- ZPT Basics (part 1)
- Exception Handling In DTML
- DTML Basics (part 4)
- DTML Basics (part 3)
- DTML Basics (part 2)
- DTML Basics (part 1)
- Using Zope With Apache

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: