Browse Prior Art Database

A unified system and method to support SPARQL queries in legacy systems

IP.com Disclosure Number: IPCOM000198117D
Publication Date: 2010-Jul-26
Document File: 4 page(s) / 106K

Publishing Venue

The IP.com Prior Art Database

Abstract

XML is widely adopted in healthcare domain, e.g, more and more patient records are stored in XMLDB to easy exchange. In addition, lots of (and more and more) legacy systems just open XML interfaces for data access, even though the underline databases are relational, due to the safety and load balance consideration. The co-exist of XML data and relational data becomes a trend. How to provide a unified system to support semantic queries in legacy systems is still an open question. Pre-art includes the solution of support semantic queries in relational DB directly. However, it cann't be used to resolve the problem when legacy DB is in XML. Another solution is a materialized method to dump the XML data into RDF data to support semantic queries. However, there are three obvious disadvantage 1) additional hardware and software investment 2) data redundancy 3) synchronization and incremental updates. The challenge of an virtual RDF view over XML DB mainly due to the dynamic and unpredicatable incoming queries. To provide materialized view is relative simply as the mapping in data level is relative static and straightforward. However, to provide virtual view, the mapping in query level should be dynamically established for every un-predicatable incoming semantic query. Dynamic translation method should be designed to cover all possible semantic queries. To seamless integrate XML and relational data, only one query fragment can be generated for one semantic query. By that way, the generated fragment can be easily embedded into host SQL or XQuery. Background about SPARQL Query and XQuery. SPARQL query is W3C's Recommendation for RDF query includes 1) Triple Pattern, 2) And Pattern, 3) Or Pattern, UNION 4) Filter, Filter (conditions) XQuery is the standard for XML data query, which is widely supported by many DBs, e.g., DB2, Oracle.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 57% of the total text.

Page 1 of 4

A unified system and method to support SPARQL queries in legacy systems

The architecture

SPARQL Client

Router and result combiner

RDF Result Set

SPARQL Query

RDF Result Set

SPARQL Query

  X2R Mapping1

SPARQL2XQuery Engine

  X2R Mapping2

SPARQL2XQuery Engine

XML Fragment

XQuery

XML Fragment

XQuery

XMLDB1

XMLDB2

The components inside SPARQL2XQuery Engine.

SPARQL2XQuery Engine

TriplePattern2XQuery

ORPattern2XQuery

AndPattern2XQuery

Filter2XPath

XPath vs XQuery

1) XPath provides simplicity. XPath is the easiest way for you to create an unordered list of phone

numbers from a subset of records in an XML document

2) XQuery provides additional power and flexibility. if you need a query that expresses more complex

record-selection criteria, transforms the result set, or requires recursion, then you need XQuery.

XPath example

Lola

Solis

2

Nina

Serafina

4

2008-01-15

2008-02-15



Selecting the last names of the users

that are under 18 years old

/user[age lt 18]/name/last/text()

XQuery main feature we considered.

1

Page 2 of 4

XQuery uses a simple syntax that is a mix of XML, XPath, comments, functions,

and a special expression syntax to tie it all together.

For tying together record-selection criteria and result-transformation instructions,

XQuery provides a feature called a FLWOR: For, Let, Where, Order by, Return let $xml:= _XML from Listing 1_
for $user in $xml//user[age lt 18]
order by $user/name/last
return $user/name/last/text()

Other XQuery features we considered.

Transforming the result set
Expressing more complex record-selection criteria

XQuery where clause can consist of nested expressions of arbitrary complexity that can even include

function calls

Using functions and recursion

define function transform-names($node as node()) as node() {

element{replace(name($node), "_", "-")} {

        $node/text(),
for $subnode in $node/* return transform-names($subnode) }

}

Expressing joins

where $book/isbn = $author//isbn and
( contains($book/title, "LISP") or contains($book/title, "Neural"))

To translate the variable and constant in SPARQL queries is relative easy.

Variable ?x -> $x

Let $x...