OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: need for defining standard APIs for xml storage

[ Lists Home | Date Index | Thread Index ]
  • From: Dongwook Shin <dwshin@nlm.nih.gov>
  • To: xml-dev@xml.org
  • Date: Fri, 31 Mar 2000 08:56:46 -0500

There seems to be some errors in moderating this mailing list.
I posted a couple of messages recently, but did never appear
in the list. So, I posted one of them again.


Hi, gopi:

I am very happy to see that you raise the necessity of API for XML
storages. I disagree with the argument that you can do all with DOM
interface. It looks like the same as you can run any application as

I have been developing XML indexing and retrieval engines, which can

scale up to large XML collections. And I also see that the similar
ones that only creates DOM and searches in DOM fail to scale
in large collections.

Every time I develop XML IR systems, I need API for XML storage.
The only time I want to invoke DOM is in indexing, which is usually
performed off-line. In retrieval, I do not want to rely on DOM,
since it may spend huge amount of memory, which seems crucial
in degrading retrieval performance. Instead, I want to use light-weight
index that maps elements to real data. To create such kind of
index without depending on specific repositories, it seems important
to have a well-defined API for XML storages.


gopi wrote:

    >Hi Gopinath!
    >Now almost all of xml storage products have a DOM interface to
    >the storage. Such as XDBM or Ozone-db. Or all of them try to
    build their
    >close to the DOM one at least. I know, there is nothing in DOM
    spec about
    >Document retrieving and storing (but Nodes).  But in most cases
    (I was
    >encountered) one can create by means of xml database the
    model of
    >folders and store Documents as subtrees of folder nodes. There
    is lack of
    >features you can get by per-Document-DTD, but it provides the
    similarity of
    >namespaces. i.e. you may consider the set of documents as a
    big nested one.
    >As about optimal storing, existed xml engines store the document
    >with the DOM-inspired model. i.e. linked Nodes. I think there is
    nothing to
    >The high-level applications such as XPath or XQL are built on the
    top of
    >(IMHO) so they work fine if you provide them any DOM complicant

            I think the problem is here, if some XQL query is like get
all the
    where "root/Book/@price > 35", do you want the XPath or XQL
    processor to
    start searching the entire xml document using DOM APIs.  Certainly
    not.  You
    will definitely expect some kind of "indexing" and "caching" in
    improve performance.  In order to do indexing, it should get some
    information from storage engine (like physical address in case of
    storage) while indexing. If the path "root/Book/@price" is indexed
    and while
    storing the xml document, the storage engine would return the
    address of each "root/Book" node and @price value.  So this helps
    "minimizing tree traversal using DOM APIs calls".  So, we expect
    standard way of getting this information (physical address) when
    storing the
    DOM node.  When the xml document is updated using some XML
    query language,
    which in turn calls DOM APIs, the "implementation" of DOM APIs
    should update
    the xml storage engine and return the retrieved value to "indexing"
            If the query is something like get all "root/Book/title"
    "root/Book/@price > 35" then the XQL processor can make query
    first to XIC
    (as in fig) to get the DOM node for "root/Book" and then use DOM
    Node.getFirstChild() which returns <title> element.  Wouldn't this
    one be
    efficient?  There will be minimal disk accesses (I can say, minimal
    engine API calls to retrieve the DOM node).
            I guess this diagram comes correctly in mailing list,

    -------------                    -----------------------    xml

                    | XPath or          |------->|XML parser       | dom

    apis   | DOM
    |------------------------------>|xml storage engine|
                    | XQL processor|             |
    |<----------------------------  |       (XSE)           |
    ------------------------                --------------
    ---------        return value from xml
    |          storage engine.
    updates|using information given by "XSE"

|                                                               |

|                                                               V
                            |       use indexing on advanced search

    | xml
    indexing component  |

    (XIC)          |


            In this, both xml storage engine and xml indexing components

    can be
    completely different products and if there is some standard APIs
    defined and
    DOM uses these implementation to store xml document and update
    any indexing
    (if set) the XPath or XQL processor while ask the "indexing"
    component first
    to get the address where DOM node is stored and then it will go to
    engine to get the information.  I think this diagram is self
    If some one thinks, it can be improved feel free to scratch some
    more lines
    on the diagram :-)
    >On Mon, 27 Mar 2000, gopi wrote:
    >> Hi all,
    >>      If this is not the right mailing list to discuss about this,

    >> exact mailing list.
    >>      Right now there is no standard set of APIs defined by any
    >> organization on "how XML should be stored to make optimal
    >> XML support what we see in either MS-SQL or Oracle 8i are not
    useful in
    >> long run.  If you want to do advanced operations on xml data.
    They just
    >> retrieve the result set data in xml form and when you make any
    changes to
    >> the document, it will not be reflected in actual database (since
    >> one way of representing result set for them). If any query is
    made on XML
    >> (using XPath or XQL or XMLQL) data already stored in db,
    either they
    >> support at all or they may make relational data query to retrieve

    >> future). Once xml data is stored in relational db they lose
    >> information (heirarchy information). Even if they store it in
    >> future), it will be inefficient when XQL query is made. The main
    >> with "the way XML data is stored", it is not stored in native XML

    >> (heirarchial form).
    >>      There are some projects going on to store "native" xml
    document like
    >> in www.dbxml.org.  But if no standard APIs are defined for
    storing and
    >> retrieving XML document(DOM tree) in storage engine, it will end
    up with
    >> everyone having their own way of storing xml document.  If
    somebody wants
    >> to switch over from one database vendor(or product providing
    xml native
    >> storage)  to another, it will not be easy.  Also, it will be
    >> use these products as "components" with other products.
    There will not
    >> standard APIs to interact with any xml native storage product.
    Why can't
    >> there be one standard set of APIs defined which every database
    >> would like to support "native" xml storage) satisfy. If this
    >> will be efficient xml storage engines in the market and which can

    >> replaced with other one if user wants.
    >>      Probable advantages:
    >>              1. It will be easy to integrate the parser with a
    >> engine. Parser implementation can use these standard APIs to
    store or
    >> retrieve information from storage. Any updates or queries can
    be using
    >> parser provided APIs also.
    >>              The parser can have some API like
    >>                      parser.setStorageEngine(StorageEngine
    >>              and interface StorageEngine is implemented by
    >>              2. XSLT processor can resolve "XPath" expressions
    >> efficiently.  There can be "xml-caching" module and
    "xml-indexing" module
    >> interacting with "xml-storage" to do optimal data access.
    >>              3. XQL processor can use "xml-caching" and
    >> modules to retrieve or update xml data.
    >>      Requirements:
    >>      1. These APIs should be generic such that the xml data can
    be stored
    >> either completely in memory or stored persistently.  Then
    current DOM
    >> implementation will become just one case of this (ie.,
    completely in
    >> memory).

    >How do you see the mechanism of this? In case of persistance
    there is
    >method may be added to DOM: flush() to free out memory buffer.
    This thing
    >done in some xml storage engines.
            This need not be DOM API it can be storage engine API and it

    will be
    defined in "xml storage engine standard APIs".  So, for in-memory
    implementation it won't do anything, but in other cases, it may
    commit all
    the changes to storage engine and free any "cached" information.
    >>      2. These APIs should be well defined so that any future APIs

    >> "xml-caching" and "xml-indexing" can be defined wrt this. I hope
    >> doesn't look stupid and makes sense to atleast one more
    person :-).
    >> regards, Gopinath
    >Best Regards,
    >Nikita Vinokurov /Project Manager/ mailto:n.vinokurov@mtu-net.ru

    >Yagel Open Source


    This is xml-dev, the mailing list for XML developers.
    To unsubscribe,
    List archives are available at http://xml.org/archives/xml-dev/


Dongwook Shin
Visiting Scholar
Lister Hill National Center for Biomedical Communications
National Library of Medicine,
8600 Rockville Pike Bethesda 20894, MD
E-mail: dwshin@nlm.nih.gov
Tel: (301) 435-3257
FAX: (301) 480-3035
URL: http://dlb2.nlm.nih.gov/~dwshin

This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/


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

Copyright 2001 XML.org. This site is hosted by OASIS