[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XQuery types was Re: Yet another plea for XUpd

  • To: "Dare Obasanjo" <dareo@m...>,"Jonathan Robie" <jonathan.robie@d...>,<xml-dev@l...>
  • Subject: RE: XQuery types was Re: Yet another plea for XUpdate...
  • From: "Ranjeet Sonone" <ranjeet@i...>
  • Date: Tue, 7 May 2002 11:50:43 -0700
  • Thread-index: AcH11mRNGRhCJ9FUQG+e3Tq5QctVigAGnAtxAAEQ1FA=
  • Thread-topic: XQuery types was Re: Yet another plea for XUpdate...

xupd
A type system to a data model is a fundamental piece used to validate
when 
the data is stored in the system that implements the datamodel AND when
the data
is manipulated using a syntax (some access language). This is the
principle on which 
SQL is built and so is XQuery. It could be arguable, not good though,
whether to make
the type system part of the data model or of the language. We could even
have everything
as a BLOB or as strings and then associate type system at runtime. I am
not sure this is 
what we want to do though.

Looking at validation issues:

1. When storing, it can be stored as anything. Just seqeunce of bytes or
binding the
datamodel types to the language the system is built in and then storing
it. The 
step of validation may be optional here, so as to push the validation to
that stage when
the data is being accessed or updated. If I can grasp the discussion
here, this is porbably 
the point Dare is making. The application level validation would be
necessary when types are 
converted from one to another E.g. ODBC/JDBC drivers.

2. When accessing, the data will have to be validated when tied with a
type system according 
to the definition of the type system. Now here, the implemetation will
have to take care of 
the type system conformance, if it is not being done when the data was
stored originally.
I do not think this is a good idea. Imagine a database that stores
everything as strings and
then publishes the associated type system (one or more) and then leaves
it to the application
to validate the data according to the type system. I think this is the
second point that Dare
is trying to make when he says that XQuery could leave the type system
(specifically schema) 
flexible to associate. But does this really make sense?

3. When updating the data, the values being updated may skip the type
validation, if the storage
does not enforce type checking when storing the data. But, to reflect
the right semantics of 
the update operation, *someone* will have to do that. It will either be
the database system or
the application. But again, which is better? To allow the update to
happen (or defer), and then 
check whether it is valid, or to check beforehand (by using a type
system associated with the data model)
and decide whether to update or not, or to report error? 

The basic assumption here is that XQuery is a language for systems that
would store XML (relational/native)
and so knowledge of the associated type system matters. 

-ranjeet
Imagine how much we could achieve if we do not care who gets the credit.



> -----Original Message-----
> From: Dare Obasanjo [mailto:dareo@m...]
> Sent: Tuesday, May 07, 2002 11:03 AM
> To: Jonathan Robie; xml-dev@l...
> Subject: RE:  XQuery types was Re:  Yet another plea
> for XUpdate...
> 
> 
> I don't understand why you continue to miss my point. My 
> original assertion which started this thread was that the 
> XQuery WG was and is incorrect in stating that a static type 
> system is necessary to add DML semantics to XQuery. The fact 
> of the matter is that regardless of all the complexity you 
> place on implementors (which will probably lead to a "Can 
> anybody implement XQuery?" thread on XML-DEV in 12 months) 
> the fact of the matter is that DML will still require 
> post-update validation in a wide range of cases. 
>  
> Secondly, if XQuery wasn't so wedded to W3C XML Schema, the 
> W3C wouldn't be forcing users of XQuery to also become users 
> of W3C XML Schema but instead would allow them to use 
> whatever XML schema technology they liked including DTDs and 
> RELAX NG.  
> 
> 	-----Original Message----- 
> 	From: Jonathan Robie 
> [mailto:jonathan.robie@d...] 
> 	Sent: Tue 5/7/2002 7:45 AM 
> 	To: xml-dev@l... 
> 	Cc: 
> 	Subject: RE:  XQuery types was Re:  
> Yet another plea for XUpdate...
> 	
> 	
> 
> 	At 09:02 PM 5/6/2002 -0700, Dare Obasanjo wrote:
> 	>Please prove this assertion untrue. XML type systems 
> (especially with
> 	>W3C XML Schema) are based on constraints. Constraints 
> are runtime
> 	>issues. Queries like
> 	>
> 	>UPDATE
> 	>   INSERT /person[@age] - 10 INTO /person/@age
> 	>
> 	>where the age attribute is a simpleType restriction of
> 	>xs:positiveInteger with minInclusive = 18 and 
> maxInclusive = 44 cannot
> 	>be verified at compile time no matter how fancy your 
> heuristics are.
> 	
> 	But the fact that there are errors you can't catch 
> until runtime does not
> 	imply that you shouldn't catch other errors before 
> running a program.
> 	
> 	Jonathan
> 	
> 	
> 	
> -----------------------------------------------------------------
> 	The xml-dev list is sponsored by XML.org 
> <http://www.xml.org>, an
> 	initiative of OASIS <http://www.oasis-open.org>
> 	
> 	The list archives are at http://lists.xml.org/archives/xml-dev/
> 	
> 	To subscribe or unsubscribe from this list use the subscription
> 	manager: <http://lists.xml.org/ob/adm.pl>
> 	
> 	
> 
> 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.