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] XQuery & Several records (instead of one xml-field)

On Fri, Oct 19, 2007 at 09:12:46AM +0530, Mukul Gandhi wrote:
[...]
> Suppose, that a RDBMS table is defined like following:
> 
> Table: X
> col1 - number (10),
> col2 - varchar2 (15),
> col3 - XMLType
> 
> The column "col3" is of type XMLType (this is just illustrating the
> concept, and does not follow a syntax of a product or a standard).
> 
> Now the XQuery program (the XQuery engine is probably embedded in the
> RDBMS) can query the column "col3". Something like:
> 
> xquery db-func:XML-column('X.col3')/root/a/b/c

Right.

> Now my questions are
> 1) It is probably possible for a XQuery engine to reuse it's design
> (i.e. for the XML infoset/PSVI) to construct a data model instance
> from the XMLType column. Do most of the XQuery engines embedded in the
> RDBMS work this way?

The Xpath 2.0 and XQuery 1.0 Data Model is conceptual.  That is, the
database doesn't actually have to construct anything at all, as long
is it generates the right results.

However, if you have specified that the column contains XML, and asked
for it to be indexed, it's likely that no pointy-bracket parsing will
be needed at runtime for many queries.

DB2 at least have released a white paper showing that their XQuery
implementation accesses the underlying data store and does not need
to go through the SQL engine; I believe the same is true for Oracle,
and possibly also Microsoft SQL Server.

> 2) Supposing a RDBMS table is defined like this (a very simple
> traditional definition):
> Table: X
> col1 - number (10),
> col2 - varchar2 (15),
> col3 - float
> 
> Can a XQuery engine work on this table structure?
Yes.

That is, some can and some can't, and some do it via SQL and
JDBC or ODBC, and some perhaps more efficiently.

Liam

-- 
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/
W3C participant/staff contact for the W3C XML Query Working Group


[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