/ Writings / Evaluation of the Need for Better Zope-RDBMS Integration

Evaluation of the Need for Better Zope-RDBMS Integration

Shane Hathaway
June 2002

Introduction

This research project seeks to decide whether Zope needs better integration with RDBMSs than it currently has, and if it does need better integration, this project also evaluates whether a new solution under construction is the right answer. First, some background on Zope and RDBMSs.

Zope is an Internet application server designed to simplify the process of putting dynamic content on the web. Zope allows people to create web sites using a common web browser. Zope Corporation, a company in Fredericksburg, Virginia, produces Zope and makes it available as free, open source software. This means that anyone can download Zope, use and improve upon it, and even sell it.

Zope is based on a technology called ZODB, or "Z Object Database". ZODB is a type of database that breaks from tradition. The databases most people are familiar with are relational databases, or RDBMSs. Relational databases are fundamentally different from object-oriented databases, or OODBMSs, like ZODB.

RDBMSs versus OODBMSs

The difference between the relational databases and object-oriented databases lies in their flexibility. To store data in an RDBMS, you must first define the complete structure of your data. For example, if you wanted to store phone numbers, you would create a table, then in that table you would set up a few columns including "name" and "phone_number". You would then write a program that can interact with those specific columns. If you later decide you want to store people's email addresses also, you have to add another column and change your program as well.

To store data in an OODBMS, you don't have to define the structure ahead of time. You only have to write your program, then connect your program to the OODBMS with a few instructions, and you're finished. The OODBMS takes advantage of the structures you naturally use when creating your program, and it simply stores the structures. It is faster and easier to write a program for an OODBMS than for an RDBMS.

But RDBMSs are very popular. The major vendors like Oracle, Sybase, IBM, Borland, and others, all sell RDBMS software. Computer science courses in practically every university teach development and administration of RDBMS-based software. RDBMSs also have certain theoretical advantages, such as the ability to search for data based on previously unanticipated criteria, and years of competition in the RDBMS market have led to refinements in reliability and scalability.

Z Object Database

One of Zope's great strengths is that it is based on ZODB. Because of ZODB, software development using Zope is fast and easy. Most of the time, when you write a program that inputs something from the user, you have to write special routines to store that data. But not so with Zope--you can just pretend that your program never stops, never crashes, and never has to write anything to disk. ZODB and Zope take care of the rest of the details.

Because of the important advantages, Zope will never give up ZODB, but people still want to be able to use RDBMSs with Zope for several reasons. As discussed already, people are already familiar with relational databases. Also, ZODB is only accessible through the Python programming language, while relational databases are more language-neutral. Relational databases can often adapt to unexpected requirements more easily. And because they have been around longer, relational databases can often hold more data, read and write data faster, and maintain full-time operation better than ZODB.

Building the Bridge

For a long time people have been requesting better relational integration in Zope. There are several mailing lists for people interested in Zope, and anyone is allowed to post to these mailing lists. A question frequently asked on these lists is, "How do I connect Zope to my database?" Several people answer, but often the answers are not quite satisfactory.

Zope has limited relational integration--you can open connections to an RDBMS and store and retrieve data, and you can even store and retrieve objects, but objects from the RDBMS never reach "first-class citizenship" in Zope. Zope does not allow you to manipulate these objects as easily as you can work with objects stored in ZODB.

Zope can also connect to a relational database using the RDBMS as a type of ZODB. This solution satisfies those who need to store large amounts of data, but it stores the data in a special Python-only format. It eliminates the possibility of adapting to new requirements later on and locks out other programming languages.

So does Zope need better integration with relational databases? Are the current solutions adequate, or do we need a solution that can give first-class citizenship to objects in a relational database?

To answer this question, I analyzed the Zope mailing lists, where people interested in Zope converse on the Internet. I am working on a product that provides a new kind of integration between Zope and relational databases, and measuring the potential support for the new product will help me choose the right audience.

Methodology

Over the past three years, people have posted about 100,000 messages to the Zope mailing lists. The messages deal with many different aspects of Zope. Many of the messages express an opinion about Zope's relational integration, sometimes explicitly and sometimes implicitly.

To narrow the sample, I took only the messages that used the word "relation" or "RDBMS" in the subject line. This yielded 196 messages posted between the time when Zope was first released in 1998 and May of 2002. Then I developed a questionnaire and a series of hypotheses that could be proved or disproved based on the answers to the questions. I filled out a questionnaire for each message.

As it turned out, even with the filter, a lot of the messages were not relevant to the survey, so the first question assessed whether the message was relevant to the survey, and if not, why. After the relevance question, the questionnaire asked four questions assessing the message poster's background, such as familiarity with Zope and the current alternatives for RDBMS integration. Finally, the questionnaire asked four more questions to evaluate the poster's opinions regarding Zope and RDBMS connectivity.

To get enough useful information, I had to make a few inferences. For example, people who were just learning how to use Zope and were requesting information on how to connect it to relational databases probably thought that integration of Zope with relational databases is important. Most of the questionnaires used the "undecided" option frequently since most messages did not express all the opinions sought after.

Detailed Evaluation

63 of the messages turned out to be relevant. 60 messages had nothing to do with RDBMS support, 42 expressed no concrete opinions on the subject, 26 were duplicates or written by an author who had already been counted, 4 had no significant content, and one of the messages was written by myself, and therefore was not included in the tally.

The first hypothesis was that people believe current RDBMS support in Zope is not quite sufficient, but it has great potential. Based on questions 6a and 6b, out of those who expressed an opinion, 61% believed it was not sufficient, and fully 100% felt it had great potential. Note that the mailing lists are likely to show a strong optimistic bias in favor of Zope-based software, so the unanimous vote of confidence is understandable.

Secondly, I hypothesized that people who are Zope "gurus" don't see as much need for relational integration, probably because there are object-oriented ways to achieve almost the same capabilities that relational databases provide. The results, based on questions 2 and 6 and illustrated in Table 1, seem to agree with this statement. Among the 7 people counted in the survey who had just started using Zope, all believed that relational integration is important and none said it was sufficient. Among those who were more familiar with Zope, 96% believed relational integration was important and 75% believed it was not yet sufficient. And among the "gurus", only 42% thought the current RDBMS integration needed improvement and only 66% thought it was an important part of Zope.



Downloaded today

Familiar

Guru

Insufficient support

4 (100%)

12 (75%)

8 (42%)

Important

7 (100%)

25 (96%)

18 (66%)

Table 1. Hypothesis 2: Gurus don't think RDBMS support is as important

The third hypothesis was very similar to the second: people just entering the Zope community see a great need for Zope relational integration. This hypothesis dealt with questions 3 and 6. To answer the third question, I estimated how often the person posts to the mailing lists. Like the results of the second hypothesis, the new people unanimously felt that RDBMS integration was not yet sufficient, while about half of the people who post often believed that the current integration was indeed sufficient. Apparently, either the technology is already there but is not easy to use, or people eventually learn how to work around the absence of relational database integration.

The fourth hypothesis evaluated whether people want relational integration primarily because they are already familiar with RDBMSs. Based on the results of question 7, familiarity is an important reason, but not the most important. As shown in Table 2, 95% wanted relational integration because RDBMSs have certain features and characteristics like data capacity and reliability. If this were the only reason people wanted relational integration, Zope's current integration would indeed be sufficient already, since it is already possible to use an RDBMS to store ZODB data, but in a Python-only format. However, at least 80% of the messages expressed needs that go beyond the capabilities of the current solutions. Particularly, 84% felt it was important that data be more accessible to languages other than Python and servers other than Zope.


People are already familiar with relational databases

16 out of 20 (80%)

Relational databases are more accessible to other languages

11 out of 13 (84%)

New kinds of queries are needed as requirements change

14 out of 17 (82%)

Relational databases have needed features or characteristics

23 out of 24 (95%)

Table 2. Why Zope needs relational database support (question 7)

The fifth hypothesis examined whether people want to connect existing Zope-based products to databases, or whether it was sufficient to connect only new products. It can be difficult to make a Zope product that is capable of storing objects in either ZODB or a relational database, so currently people have to choose between one or the other when writing their products. The results of the question 8 show that people want both: 90% want to store objects of existing types, and 100% of those who expressed an opinion wanted to be able to store objects of new types in an RDBMS.

The sixth hypothesis guessed that Zope RDBMS support should be usable by newcomers. If people consider Zope RDBMS integration important, and the solution is easy to use and learn, this feature should be advertised. Based on question 9, 72% believed new users should benefit from the RDBMS integration, 91% believed people who work with Zope through the web need the feature, and 100% saw product authors as an important audience. This means the solution must primarily be easy to use by product authors. Secondly, it should be easy to use by script writers and newcomers.

Results

Current RDBMS support is not sufficient but definitely has great potential. This belief is more prevalent among those new to Zope than those who are highly familiar with Zope. People want relational integration primarily for reliability, data capacity, and other RDBMS features; but they also want it for language independence, for future unanticipated requirements, and because RDBMSs are familiar to them. The integration should work almost as well for existing products as it does for new products. Product authors and script writers should be the primary audience, but newcomers want RDBMS integration also.

These results confirm the overall theory that Zope needs better integration with RDBMSs than it currently has. And they suggest that the solution being built, if it is easy enough for product authors to use, will indeed fulfill the requirements expressed by the Zope community.

Comments on the Methodology

Analyzing messages for semantics turned out to be more difficult than planned. I had to be very careful not to introduce a bias, so I had to read each message very carefully. To use this method on a larger scale, I would solicit the assistance of a second reviewer, who would review the same messages I did. We would compare the independent results to arrive at a standard deviation calculation.

This method has certain benefits over conventional survey methods. The sample comes from real-world wants and needs, rather than the people who happen to have a few minutes to spare. The sample spans several years and even includes the opinion of those who tried Zope once but left the community because Zope did not support relational databases well.

This method has a regrettable downside, though. The numbers in the results tend to look sporadic, since so many of the answers to the questions had to be left "undecided". In a conventional survey, most people answer all of the questions, so it's easy to compare the answers to one question with the answers to another question. Still, I believe the results are valid and conclusive enough for me to pursue a new kind of Zope RDBMS integration.

© 2002 Shane Hathaway



WORKS CITED

Lloyd, Brian. "An Introduction to Zope."
Developer Shed, 03 August 1999.

http://www.devshed.com/Server_Side/Zope/Intro/page1.html


The Zope Community. The Zope Mailing Lists.

http://www.zope.org/Resources/MailingLists


Appendix A. The Survey Questionnaire.

1. Relevance to survey

Relevant
Non-relevant (no content)
Non-relevant (no opinions expressed on Zope RDBMS support)
Non-relevant (written by Shane)
Non-relevant (not about Zope RDBMS support)
Non-relevant (duplicate author or message)

2. Estimated familiarity with Zope

Downloaded today
Familiar
Guru

3. Estimated community participation

First Post
Lurker
Regular

4. Estimated skills (those that are likely to affect opinion)

a. Can create an application based on a relational database

Agree Disagree Undecided or N/A

b. Can write Python products for Zope

Agree Disagree Undecided or N/A

c. Can create an object-relational mapping using Python code

Agree Disagree Undecided or N/A

d. Can use Python low-level tricks

Agree Disagree Undecided or N/A



5. Message poster is aware of

a. ZSQLMethods

Agree Disagree Undecided or N/A

b. ZCatalog

Agree Disagree Undecided or N/A

c. ZPatterns

Agree Disagree Undecided or N/A

d. DBObjects / SmartObjects

Agree Disagree Undecided or N/A


6. Zope's support for relational databases

a. Is sufficient today

Agree Disagree Undecided or N/A

b. Has great potential

Agree Disagree Undecided or N/A

c. Is of lesser importance

Agree Disagree Undecided or N/A



7. The most important reasons Zope needs relational database support are

a. People are already familiar with relational databases

Agree Disagree Undecided or N/A

b. Relational databases are more accessible to other languages / apps

Agree Disagree Undecided or N/A

c. New kinds of queries are needed as requirements change

Agree Disagree Undecided or N/A

d. Relational databases have needed features / characteristics

Agree Disagree Undecided or N/A



8. Type of objects Zope should be able to store in relational databases

a. Objects of existing types

Agree Disagree Undecided or N/A

b. Objects of new types

Agree Disagree Undecided or N/A



9. Zope relational database support should be designed to benefit

a. New users

Agree Disagree Undecided or N/A

b. TTW authors

Agree Disagree Undecided or N/A

c. Product authors

Agree Disagree Undecided or N/A



Appendix B. Hypotheses.

  1. People believe current RDBMS support is not quite sufficient, but it has great potential.

  1. People who are very familiar with Zope don't see much need for RDBMS support.

  1. First posters see a great need for RDBMS support.

  1. The primary reason Zope needs RDBMS support is that people are already familiar with relational databases.

  1. People need to store objects of existing types almost as much as storing objects of new types.

  1. Zope RDBMS support should be usable by newcomers.



Appendix C. Hypothesis Evaluations.

1. Zope's support for relational databases:
  Is sufficient today
    agree 15 (38%)
    disagree 24 (61%)
    undecided 24
  Has great potential
    agree 37 (100%)
    disagree 0 (0%)
    undecided 26
  Is of lesser importance
    agree 10 (16%)
    disagree 50 (83%)
    undecided 3


2. Estimated familiarity with Zope * Zope's support for relational databases:
Downloaded today--
  Is sufficient today
    agree 0 (0%)
    disagree 4 (100%)
    undecided 3
  Has great potential
    agree 3 (100%)
    disagree 0 (0%)
    undecided 4
  Is of lesser importance
    agree 0 (0%)
    disagree 7 (100%)
    undecided 0
Familiar--
  Is sufficient today
    agree 4 (25%)
    disagree 12 (75%)
    undecided 12
  Has great potential
    agree 17 (100%)
    disagree 0 (0%)
    undecided 11
  Is of lesser importance
    agree 1 (3%)
    disagree 25 (96%)
    undecided 2
Guru--
  Is sufficient today
    agree 11 (57%)
    disagree 8 (42%)
    undecided 9
  Has great potential
    agree 17 (100%)
    disagree 0 (0%)
    undecided 11
  Is of lesser importance
    agree 9 (33%)
    disagree 18 (66%)
    undecided 1


3. Estimated community participation * Zope's support for relational databases:
First Post--
  Is sufficient today
    agree 0 (0%)
    disagree 5 (100%)
    undecided 8
  Has great potential
    agree 6 (100%)
    disagree 0 (0%)
    undecided 7
  Is of lesser importance
    agree 0 (0%)
    disagree 12 (100%)
    undecided 1
Lurker--
  Is sufficient today
    agree 3 (37%)
    disagree 5 (62%)
    undecided 5
  Has great potential
    agree 6 (100%)
    disagree 0 (0%)
    undecided 7
  Is of lesser importance
    agree 1 (8%)
    disagree 11 (91%)
    undecided 1
Regular--
  Is sufficient today
    agree 12 (46%)
    disagree 14 (53%)
    undecided 11
  Has great potential
    agree 25 (100%)
    disagree 0 (0%)
    undecided 12
  Is of lesser importance
    agree 9 (25%)
    disagree 27 (75%)
    undecided 1


4. The most important reasons Zope needs relational database support are:
  People are already familiar with relational databases
    agree 16 (80%)
    disagree 4 (20%)
    undecided 43
  Relational databases are more accessible to other languages / apps
    agree 11 (84%)
    disagree 2 (15%)
    undecided 50
  New kinds of queries are needed as requirements change
    agree 14 (82%)
    disagree 3 (17%)
    undecided 46
  Relational databases have needed features / characteristics
    agree 23 (95%)
    disagree 1 (4%)
    undecided 38


5. Type of objects Zope should be able to store in relational databases:
  Objects of existing types
    agree 20 (90%)
    disagree 2 (9%)
    undecided 41
  Objects of new types
    agree 34 (100%)
    disagree 0 (0%)
    undecided 29


6. Zope relational database support should be designed to benefit:
  New users
    agree 13 (72%)
    disagree 5 (27%)
    undecided 45
  TTW authors
    agree 31 (91%)
    disagree 3 (8%)
    undecided 29
  Product authors
    agree 36 (100%)
    disagree 0 (0%)
    undecided 27

Appendix D. A Sample Message and Evaluation.

From: "Bjorn Stabell" <bjorn@exoweb.net>

Date: Fri, 8 Mar 2002 16:50:28 +0800

Subject: [Zope-dev] Manual object-to-relational persistency framework

Hello,

I'm trying to use Zope without storing everything in ZODB while still
having the perception of an object-oriented database. I want to control
the object-to-relational mapping layer, but would like the loading and
saving of objects to be automatic. Is there some way to do that using
Zope?

Where would I, e.g., hook into to get automatic loading/cacheing/saving
of objects that weren't stored in ZODB, and where I could actually
create the methods to load/save objects myself (I want to control the
data structure).

Regards,
--=20
Bjorn

Relevance to survey

Relevant
Non-relevant (no content)
Non-relevant (no opinions expressed on Zope RDBMS support)
Non-relevant (written by Shane)
Non-relevant (not about Zope RDBMS support)
Non-relevant (duplicate author or message)

Estimated familiarity with Zope

Downloaded today
Familiar
Guru

Estimated community participation

First Post
Lurker
Regular

Estimated skills (those that are likely to affect opinion)

Can create an application based on a relational database
Agree Disagree Undecided or N/A

Can write Python products for Zope
Agree Disagree Undecided or N/A

Can create an object-relational mapping using Python code
Agree Disagree Undecided or N/A

Can use Python low-level tricks
Agree Disagree Undecided or N/A

Aware of

ZSQLMethods
Agree Disagree Undecided or N/A

ZCatalog
Agree Disagree Undecided or N/A

ZPatterns
Agree Disagree Undecided or N/A

DBObjects / SmartObjects
Agree Disagree Undecided or N/A

Zope's support for relational databases

Is sufficient today
Agree Disagree Undecided or N/A

Has great potential
Agree Disagree Undecided or N/A

Is of lesser importance
Agree Disagree Undecided or N/A

The most important reasons Zope needs relational database support are

People are already familiar with relational databases
Agree Disagree Undecided or N/A

Relational databases are more accessible to other languages / apps
Agree Disagree Undecided or N/A

New kinds of queries are needed as requirements change
Agree Disagree Undecided or N/A

Relational databases have needed features / characteristics
Agree Disagree Undecided or N/A

Type of objects Zope should be able to store in relational databases

Objects of existing types
Agree Disagree Undecided or N/A

Objects of new types
Agree Disagree Undecided or N/A

Zope relational database support should be designed to benefit

New users
Agree Disagree Undecided or N/A

TTW authors
Agree Disagree Undecided or N/A

Product authors
Agree Disagree Undecided or N/A

Click below to fill in the scripture reference.
Your browser is not able to display the scripture fill-in program. To see it, enable Javascript or use Mozilla 1.0 or better.
For the natural man is an enemy to God, and has been from the fall of Adam, and will be, forever and ever, unless he yields to the enticings of the Holy Spirit, and putteth off the natural man and becometh a saint through the atonement of Christ the Lord, and becometh as a child, submissive, meek, humble, patient, full of love, willing to submit to all things which the Lord seeth fit to inflict upon him, even as a child doth submit to his father.

Church: lds scriptures provident games pearls kzion shiblon film chancellor gateway cumorah byutv happiness nephi
Zope: freezope org com zen labs newbies zettai warnes
Python: home pyzine daily icanprogram
Genealogy: cyndi
Weblogs: jeffrey paul jon joel another-shane guido barry jeremy windley chrism zac
News: quakes lwn dc weather deseret zeitgeist softwarelivre
Zaurus: software developer
Tech: tango spintronics thin
Semantic: aaron sean
Reference: css rdf html4 javascript geckodom iecss emacs phrases acronyms
Reverse: advogato slashdot
Misc: gimp-savvy directory soda jokes shouldexist pdphoto