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

Re: Re: ID/IDREF makes XML generation NP-hard


id idref
From: "Murali Mani" <mani@C...>

> The main things about the 3 works are:
> 
> 1. Henry Thompson showed that given a DTD, to check whether there is a
> valid instance is NP complete. It is definitely in NP, and henry showed it
> is NP Hard by reduction from 3SAT.

My point is that Henry showed something different: it applies only to DTD 
containing fixed or defaulted IDs or IDREFs.  So while it applies to DTDs 
in general, it does not apply to *most* DTDs, and it is trivial to figure out 
if the DTD has fixed or defaulted IDs or IDREFs.  

I have seen people use Henry's analysis as some kind of proof that ID/IDREF
itself is bad, and I just cannot see the connection, if indeed it says nothing
about normal use of ID/IDREF. (Who on earth uses fixed or defaulted IDs:
it is very strange?)

> 2. The work by Wenfei Fan et al, show that if we have keys and foreign
> keys specified as path expressions, then whether there is a valid instance
> that satisfies both the DTD and the constraints is undecidable (note: this
> is different from NPC). Note at the same time, for relational model,
> whether there is a valid instance for a given relational schema is
> trivially true.

s/DTD/grammar/   

Presumably one example of this is checking whether there is a valid instance
that conforms to a grammar and to Schematron schemas.

> 3. The work in ICDE 94 shows that given a ER model, whether there is a
> valid instance is polynomially decidable, this is true even in the
> presence of ISA constraints. They further show that whether a cardinality
> is implied by a set of ISA and cardinality constraints is decidable in
> polynomial time.
> 
> My two cents worth: 3) is very promising. I would argue that we should
> design XML models so that it conforms to 3). I have tried to base our work
> on that - the work i pointed about constraint specification. I am not sure
> of the significance of trying to answer whether a key is implied by a
> given set of keys and foreign keys, which is undecidable even for the
> relational model.

I think both the DSDL group at ISO and the W3C XML Schema group 
would be very interested in insight on how to move forward with keys.

> More work needs to be done with respect to constraint specification.
 
Yes indeed. Which is one reason I suspect the Schematron approach,
of just levering what is convenient and comprehensible, is appropriate 
at the moment: if the properties of paths to trees are still active research. 

Cheers
Rick Jelliffe

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-2011 All Rights Reserved.