Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 32932 invoked from network); 20 Feb 2006 03:10:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Feb 2006 03:10:59 -0000 Received: (qmail 49437 invoked by uid 500); 20 Feb 2006 03:10:58 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 49426 invoked by uid 99); 20 Feb 2006 03:10:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Feb 2006 19:10:58 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=RCVD_IN_SORBS_WEB,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.34] (HELO brmea-mail-3.sun.com) (192.18.98.34) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Feb 2006 19:10:57 -0800 Received: from fe-amer-05.sun.com ([192.18.108.179]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id k1K3AbQj024466 for ; Sun, 19 Feb 2006 20:10:37 -0700 (MST) Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) id <0IUY00C01T8CUE00@mail-amer.sun.com> (original mail from Craig.Russell@Sun.COM) for jdo-dev@db.apache.org; Sun, 19 Feb 2006 20:10:37 -0700 (MST) Received: from [10.251.12.118] (m815f36d0.tmodns.net [208.54.95.129]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0IUY0076CU5NJH00@mail-amer.sun.com> for jdo-dev@db.apache.org; Sun, 19 Feb 2006 20:10:37 -0700 (MST) Date: Sun, 19 Feb 2006 19:10:36 -0800 From: Craig L Russell Subject: Re: jdo.dtd changes (was: Re: Spec review items Chapter 18) In-reply-to: <43F8D5AE.9040206@spree.de> Sender: Craig.Russell@Sun.COM To: Apache JDO project Message-id: <44A4E5ED-57C7-4C82-B687-988D512B96C2@Sun.COM> MIME-version: 1.0 X-Mailer: Apple Mail (2.746.2) Content-type: multipart/signed; protocol="application/pkcs7-signature"; boundary=Apple-Mail-115-1036563525; micalg=sha1 References: <6BAD7096-9AB5-4673-8CE2-CD58ECBA72F4@Sun.COM> <43F8B892.6000705@spree.de> <43F8D5AE.9040206@spree.de> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Apple-Mail-115-1036563525 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Michael, On Feb 19, 2006, at 12:31 PM, Michael Bouschen wrote: > Hi Craig, > > I implemented the jdo.dtd changes, you find a patch file attached. > > However, I have three questions: > (1) I changed the foreign-key elements as I described below: > extension*)> I think this should allow any number of extensions before or after, and your choice of one of column*, field*, or property*. I don't think it makes sense for a foreign key, index, or unique to combine more than one. I thought that (column* | field* | property*) said that. So, my proposal: > I did the same change for the elements index, unique and fetch-group. > This change might not what you had in mind. Please let me know. > (2) I changed the value order for the foreign-key attributes delete- > action and update-action to match the definition of delete-action > and update-action in other elements. The only difference is that > foreign-key does not allow the value 'none'... I found some information on this: InnoDB rejects any INSERT or UPDATE operation that attempts to create a foreign key value in a child table if there is no a matching candidate key value in the parent table. The action InnoDB takes for any UPDATE or DELETE operation that attempts to update or delete a candidate key value in the parent table that has some matching rows in the child table is dependent on the referential action specified using ON UPDATE and ON DELETE subclauses of the FOREIGN KEY clause. When the user attempts to delete or update a row from a parent table, and there are one or more matching rows in the child table, InnoDB supports five options regarding the action to be taken: CASCADE: Delete or update the row from the parent table and automatically delete or update the matching rows in the child table. Both ON DELETE CASCADE and ON UPDATE CASCADE are supported. Between two tables, you should not define several ON UPDATE CASCADE clauses that act on the same column in the parent table or in the child table. SET NULL: Delete or update the row from the parent table and set the foreign key column or columns in the child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier specified. Both ON DELETE SET NULL and ON UPDATE SET NULL clauses are supported. NO ACTION: In standard SQL, NO ACTION means no action in the sense that an attempt to delete or update a primary key value is not allowed to proceed if there is a related foreign key value in the referenced table. InnoDB rejects the delete or update operation for the parent table. RESTRICT: Rejects the delete or update operation for the parent table. NO ACTION and RESTRICT are the same as omitting the ON DELETE or ON UPDATE clause. (Some database systems have deferred checks, and NO ACTION is a deferred check. In MySQL, foreign key constraints are checked immediately, so NO ACTION and RESTRICT are the same.) SET DEFAULT: This action is recognized by the parser, but InnoDB rejects table definitions containing ON DELETE SET DEFAULT or ON UPDATE SET DEFAULT clauses. So I think that the delete-action should allow all of the cascade, null, none, restrict, and default. None might be "deferred checking" but otherwise is the same as restrict. > (3) I think the attribute update-action should restrict the > permitted values to the same values as key/value update-action, so > 'none' should be allowed. What do you think? I think both delete-action and update-action should allow all of the actions. > > As soon as we agreed on the changes I can update the jdo.xsd > accordingly and change the test cases Positive99-dtd.jdo and > Positive99-xsd.jdo. Ok. Craig > > Regards Michael > >> Hi Craig, >> >> sorry for not replying earier. >> >>> Javadogs, >>> >>> I've made these changes to the final spec. >>> >>> Craig >>> >>> On Feb 15, 2006, at 11:37 AM, Craig L Russell wrote: >>> >>>> 1. >>>> should be >>>> >>>> >>>> 2. >>> extension*)> >>>> should be >>>> >>> extension*)> >>> >>> >> I read (column*|field*|property*) as: either a list of columns or >> a list of fields or a list of properties. So you cannot have >> fields and properties mixed. Did you intend to have a list of >> columns, followed by a list of fields, followed by a list of >> properties: >> > extension*)> >> >> The fetch-group element looks similar. Did you paln you change >> this too: >> > extension*)> >> >> Regards Michael >> >>>> >>>> 3. same as 2 for index >>> >>> >>> >>> Same as 2 for unique as well. >>> >>>> >>>> 4. >>>> element update-action should restrict the permitted values to >>>> the same values as foreign-key update-action >>>> >>>> 5. Missing element key attribute update-action >>>> >>>> 6. Missing element value attribute update-action >>>> >>>> 7. Element order should not have the delete-action, update- >>>> action, indexed, and unique attributes >>>> Anything else? >>>> >>>> Craig >>>> >>>> Craig Russell >>>> Architect, Sun Java Enterprise System http://java.sun.com/ >>>> products/jdo >>>> 408 276-5638 mailto:Craig.Russell@sun.com >>>> P.S. A good JDO? O, Gasp! >>>> >>> >>> Craig Russell >>> >>> Architect, Sun Java Enterprise System http://java.sun.com/ >>> products/jdo >>> >>> 408 276-5638 mailto:Craig.Russell@sun.com >>> >>> P.S. A good JDO? O, Gasp! >>> >>> >> >> > > > -- > Michael Bouschen Tech@Spree Engineering GmbH > mailto:mbo.tech@spree.de http://www.tech.spree.de/ > Tel.:++49/30/235 520-33 Buelowstr. 66 > Fax.:++49/30/2175 2012 D-10783 Berlin > > Index: src/dtd/javax/jdo/jdo.dtd > =================================================================== > --- src/dtd/javax/jdo/jdo.dtd (Revision 378929) > +++ src/dtd/javax/jdo/jdo.dtd (Arbeitskopie) > @@ -99,7 +99,7 @@ > > > > - > + > > > > @@ -123,11 +123,11 @@ > > > > - extension*)> > + extension*)> > > > - default) 'restrict'> > - default) 'restrict'> > + default) 'restrict'> > + default) 'restrict'> > > > > @@ -151,6 +151,7 @@ > > > #IMPLIED> > + #IMPLIED> > > > > @@ -159,6 +160,7 @@ > > > #IMPLIED> > + #IMPLIED> > > > > @@ -173,16 +175,15 @@ > > > none) #IMPLIED> > - > + none) #IMPLIED> > > > > > > - > > > - extension*)> > + property*, extension*)> > > > > @@ -197,7 +198,7 @@ > > noncontiguous) #REQUIRED> > > - > + > > > > @@ -209,7 +210,7 @@ > > > > - > + extension*)> > > > Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:Craig.Russell@sun.com P.S. A good JDO? O, Gasp! --Apple-Mail-115-1036563525 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: att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