[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] XQuery & Several records (instead of one xml-field)
- From: "Mukul Gandhi" <gandhi.mukul@gmail.com>
- To: "Jim Melton" <jim.melton@acm.org>
- Date: Fri, 19 Oct 2007 09:12:46 +0530
Hi Jim,
Thanks for all the interesting information.
Nice to know that there is now a native support for XML in SQL (the
SQL/XML concept in the ISO/IEC spec).
I have few general questions about how XQuery data model instances are
constructed from the XML store in RDBMS.
From your mail, it seems the primary means of XML storage in a RDBMS
is via the XML data type in RDBMS Schema. And we can query this
information using XQuery.
At the XQuery level, the XML input is converted to a data model
instance, which the XQuery program operates on.
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
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? Do you know how Oracle's XQuery engine in RDBMS
work with respect to this? And how DB2's engine works if somebody can
tell?
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? i.e. is it practical
to convert a table based data to a XQuery data model instance, which a
XQuery program can operate on?
On 10/18/07, Jim Melton <jim.melton@acm.org> wrote:
> Mukul,
>
> In addition to the sources already cited, I should mention part 14 of
> the SQL standard (ISO/IEC 9075-14:2006, called SQL/XML, new edition
> expected in mid-2008), that defines a new datatype, XML, for use as
> the type of SQL columns, parameters, variables, etc (collectively
> "sites"). XML values stored in sites of type XML are manipulated
> primarily by invoking XQuery from within SQL statements.
>
> SQL/XML provides default rules for "viewing" relational tables as
> though they were XML documents, as well as facilities that allow
> application writers to customize the XML structures created from
> those relational tables.
>
> SQL/XML is "fully" implemented by Oracle (full disclosure: I work for
> Oracle), IBM, Microsoft, HiRDB (Hitachi), and others. I put the word
> "fully" in quotes because none of those products implement every
> single tiny little option in the SQL/XML standard. They all do, to
> my knowledge, implement "core SQL/XML" and quite a few of the
> optional features. Speaking only from the Oracle viewpoint, we have
> scads (that's an Americanism meaning "a whole lot") of customers
> using our SQL/XML features and managing their XML data directly in
> their SQL database systems.
>
> By the way, the first version of SQL/XML was published in 2003, four
> years ago, and products that implemented it hit the street less than
> a year later. (That first version did not have the ability to invoke
> XQuery from within SQL, largely because XQuery wasn't near enough to
> publication as a Recommendation at that time.)
>
> Hope this helps,
> Jim
>
>
> At 10/18/2007 07:26 AM, Mukul Gandhi wrote:
> >Do these products construct from scratch the XQuery data model
> >instance, from a RDBMS Schema ?
> >
> >I have read that some latest RDBMSs provide a native XML store, which
> >can be queried with XQuery. Something like XML type support in table
> >columns.
> >
> >On 10/18/07, Michael Kay <mike@saxonica.com> wrote:
> > > > Some people said me, that extraction of _records from several
> > > > database tables_ into XML is possible by XQuery. I searched
> > > > via google during last two week, read many documents about
> > > > XQuery and related topics, but found only usage of XQuery for
> > > > extraction XML-elements from XML-field, i.e. from _one field_.
> > >
> > > Sounds as if you didn't find DataDirect's product
> > >
> > > http://www.datadirect.com/products/xquery/index.ssp
> > >
> > > I think BEA Liquid Data also has such facilities.
> > >
> > > Michael Kay
> > > http://www.saxonica.com/
> >
> >
> >--
> >Regards,
> >Mukul Gandhi
> >
> >_______________________________________________________________________
> >
> >XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> >to support XML implementation and development. To minimize
> >spam in the archives, you must subscribe before posting.
> >
> >[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> >Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> >subscribe: xml-dev-subscribe@lists.xml.org
> >List archive: http://lists.xml.org/archives/xml-dev/
> >List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
> ========================================================================
> Jim Melton --- Editor of ISO/IEC 9075-* (SQL) Phone: +1.801.942.0144
> Co-Chair, W3C XML Query WG; XQX (etc.) editor Fax : +1.801.942.3345
> Oracle Corporation Oracle Email: jim dot melton at oracle dot com
> 1930 Viscounti Drive Standards email: jim dot melton at acm dot org
> Sandy, UT 84093-1063 USA Personal email: jim at melton dot name
> ========================================================================
> = Facts are facts. But any opinions expressed are the opinions =
> = only of myself and may or may not reflect the opinions of anybody =
> = else with whom I may or may not have discussed the issues at hand. =
> ========================================================================
--
Regards,
Mukul Gandhi
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]