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] JDBC in an XQuery world (?)

Michael Sokolov scripsit:

> let's map "xml root element name" to "table" and "document" to "row"

Sounds right.  It's "column" that's the hard idea.  Which of the
objects in a document count as columns?  Normal column names are just
identifiers, although it's possible to use arbitrary characters in
a column name if you wrap it in single quotes, so that would be an
escape for getting XPath expressions (though they would have to be
single-valued ones).  But the expectation is that there would be a
natural mapping of ordinary identifiers, and what would that be?  
Should we map the column identifier foo to the XPath /foo[1], or
perhaps //foo[1]?

> This might be enough for selects, but I guess for inserts you'd have
> to define column mappings.

Not just for inserts, but for selects as well, as shown above.  For
inserts you also have to define an *order* of columns and keep it in the
database somewhere, so that you can interpret "insert into foo values(1,
2, 3)" and know what column names are implied.


> These would probably have to be drawn from some subset of all xpath
> expressions like forward steps only, no function calls, something like
> that - I think MarkLogic searchable xpath expression is something like
> this).  You would have to introduce a new kind of schema for defining
> these mappings.

That makes sense for the escaped version of column names, except that
as I say SQL expects a column to be single-valued, so you need an
expression guaranteed to return one value.

-- 
[W]hen I wrote it I was more than a little              John Cowan
febrile with foodpoisoning from an antique carrot       cowan@ccil.org
that I foolishly ate out of an illjudged faith          http://ccil.org/~cowan
in the benignancy of vegetables.  --And Rosta


[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