[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Relational Database Connectivity

webmaster@zope.org webmaster@zope.org
Sat, 28 Sep 2002 08:57:20 -0400

A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/RelationalDatabases.stx#3-111


      Most commercial and open source relational databases support
      transactions. If your relational database supports transactions,
      Zope will make sure that they are tied to Zope
      transactions. This ensures data integrity across both Zope and
      your relational database. If either Zope or the relational
      database aborts the transaction, the entire transaction is

        % Anonymous User - June 20, 2002 9:16 pm:
         I cannot find anything in the book relating to the scope of zope transactions other than with regard to site
         How does one logically group a set of changes initiated through more than one method/script?

        % Anonymous User - Sep. 10, 2002 6:36 am:
         I agree, the transaction concept regarding Z SQL Methods should be covered more thoroughly.

        % Anonymous User - Sep. 28, 2002 8:57 am:
         AFAIK i know, a Zope transaction is erverything from start of request until the response is sent to the
         client browser.
         Zope braces the request processing 
         with "start transaction; try" <process request here> "except rollback; else commit". 

         Say, in processing a web request, a method M calls several ZSQL Methods "A", "B1", "B2",... and inserting "A"
         returns a unique primary key used in the calls "Bx" to insert as a foreign key, like
            k=A(); B1(k); B2(k);

         if one of the ZSQL methods fails, the method M also fails and the database wont change. blf