XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Re: [xquery-talk] JDBC in an XQuery world (?)


On 02 Oct 2011, at 20:42, John Cowan wrote:

> Liam R E Quin scripsit:
> 
>>> What if I have (or want) an XQuery database
>>> (or would you call that a XML database with an XQuery interface ...?) 
>> 
>> SQL/XML I think describes enough of a mapping, no?
> 
> I don't think so.  SQL/XML extends SQL to add XML as a new kind of primitive
> SQL data type, like strings, numbers, and dates.  What's needed here is a
> way to do ordinary SQL operations over an XDM-based database.

It does do a bit more as far as I understood it, e.g. it also introduce a "schredding" construct, XMLTABLE

Here is an example (http://www.ibm.com/developerworks/data/library/techarticle/dm-0708nicola/)

SELECT X.* 
FROM emp, 
XMLTABLE ('$d/dept/employee' passing doc as "d" 
   COLUMNS 
   empID 	INTEGER 	PATH '@id',
   firstname 	VARCHAR(20) 	PATH 'name/first',
   lastname 	VARCHAR(25) 	PATH 'name/last') AS X

In this case the source is still a table with some XML in some column but I guess making the step to some XML collection in some XML database is not that big.

Peter


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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS