[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Michael Kay" <mike@s...>
  • To: <mike@a...>
  • Date: Sat, 9 Feb 2008 00:27:38 -0000

As an external user communicating what I want, A/B[@ID=?4?]/C, says: starting at the As, goto Bs with an ID of ?4?, and then select all Cs with the qualified B parents. How it is performed internally is not the user?s concern as long as the internal processing semantics match the external operational semantics. In SQL: ?SELECT C.vals FROM ABCview WHERE B.id=?4??  is a more nonprocedural having separated structure definition from the data request no longer requires the user to have knowledge of structure enabling their query to be free of  the structure.  
 
You're saying two things here: first you're saying that a path expression is procedural because the user thinks of it as being evaluated in a particular way, and the fact that this might be a completely false model has nothing to do with it - it's what's in the user's mind that counts. On that basis you presumably also think that regular expressions are procedural because users think of them as being processed from left to right. And presumably functional languages like Haskell are procedural too. That makes the word meaningless, in my view.
 
Then you change tack and talk about SQL having a higher level of data independence (that is, the user needs to know less about the structure). That's a completely orthogonal discussion. I would say it's equally true of XQuery and SQL that you can't write a query if you don't know the schema. What is true, I grant you, is that there's no equivalent in the XML world of the design discipline of third-normal form in the relational world. That means that there are more legitimate ways to represent a given data set in XML than there are in relational tables. But since real databases are never in third normal form anyway (because it's unusable for anything real), this doesn't actually help as much as you might think: in practice, the user has to know how the data is organized.
 
 
Michael Kay
http://www.saxonica.com/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member