This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3796 - [UPDUseCases] Clarify how application constraints raise dynamic errors
Summary: [UPDUseCases] Clarify how application constraints raise dynamic errors
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility 1.0 Use Cases (show other bugs)
Version: Working drafts
Hardware: PC All
: P4 minor
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords: needsAction
Depends on:
Blocks:
 
Reported: 2006-10-04 18:03 UTC by Ronald Bourret
Modified: 2011-01-10 05:44 UTC (History)
1 user (show)

See Also:


Attachments

Description Ronald Bourret 2006-10-04 18:03:34 UTC
Relational queries 8 and 9 (1.1.4.8 and .9) state that:

"An application constraint requires that no bid be placed on an item which was not previously registered in the database. ... This update violates an application constraint. Therefore, its execution raises a dynamic error ..."

It is not clear how an application constraint can cause a dynamic error to occur, as there does not appear to be any way for XQuery to know that this constraint exists.

I suspect that what is meant is that there is a referential integrity constraint in the database that is violated by the query, that the database reports this error to the XQuery processor, and that the XQuery processor raises this as an implementation-defined dynamic error.

If this is the case, then:

a) Please clarify. For example, state that the query violates a constraint in the underlying database. (The term "application constraint" is misleading, as it is reasonable to assume that the application is the piece of software that invokes the XQuery processor, rather than the combination of this software and the database. In this case, an application constraint is enforced at a higher level than XQuery, so XQuery won't know about it unless it is part of the query itself.)

b) Please modify the description of the data to state that such a constraint exists. Although it is implied that unique and foreign key constraints exist on the tables, this is never stated.
Comment 1 Ronald Bourret 2009-05-20 22:05:13 UTC
Thanks for the changes. Unfortunately, there are still some ambiguities.  Please make the following changes:

1) In section 1.1.3, change:

   ... by the following table:

to
   ... by the following tables:

2) Change the last sentence of section 1.1.3 to:

   The underlying database system has the following referential 
integrity constraints:

   o A foreign key on the BIDS table requires that BIDS.USERID contains a value that is found in USERS.USERID

   o A foreign key on the BIDS table requires that BIDS.ITEMNO contains a value that is found in ITEMS.ITEMNO

3) In section 1.1.4.8, change the next-to-last sentence from:

   This update violates an application constraint.

to

   This update violates the previously mentioned referential integrity constraint.

4) Please clarify error generation in section 1.1.4.9. For example, change:

   An auction application constraint imposes that a bid cannot be made at a lower price than the highest bid made so far on that item.

to:

   A trigger in the underlying database ensures that a bid cannot be made at a lower price than the highest bid made so far on that item.

And change:

   Like the previous one, this update violates an application constraint, therefore its execution will raise a dynamic error...

to:

   This update causes the previously mentioned trigger to return an error. Therefore, its execution will raise a dynamic error...

Thanks.
Comment 2 Jonathan Robie 2009-11-05 18:26:05 UTC
The WG decided to accept these changes, they will appear in the next published draft.
Comment 3 Jim Melton 2011-01-08 03:22:51 UTC
Having been informed that these changes had not yet been made when I prepared the Use Cases NOTE to accompany the PR for Update 1.0, I have made the changes and reposted the NOTE.