[seek-dev] implement XQuery in EcoGrid and SRB
Bing Zhu
bzhu at sdsc.edu
Thu Jun 5 17:41:45 PDT 2003
Peter and Jing,
The whole EcoGrid data stored in metacat, SRB, (others), can be viewed as a
virtual XML document (or a DOM object). This DOM object has at least two
sub-nodes,
metacat and srb.
Since SRB is organized in collection and sub-collection hierarchical
architecture, each collection is a subnode in the XML tree under
(/EcogGrid)/srb. (Actually
we can define a XML schema for our EcoGrid data. ). Thus we can implement
XQueries in
our EcoGrid to act as a common query engine across different systems
(metacat, SRB, etc.)
I compiled some examples of XQueries to search documents in SRB.
(1) Search all design documents stored in SRB collection,
/home/bzhu.sdsc/designDocs,
which were created before Sept 23, 2002.
for $e in document(EcoGrid.xml)/srb/home/bzhu.sdsc/designDocs
where $e/@objtype = file and $e/@time lt date(09-23-2002)
return <datasrc>SRB</datasrc><dataname>$e/@name</dataname>
(2) find all datasets stored in SRB which have titles containing protein
and
are owned by Professor John whose user name is john.
for $e document(EcoGrid.xml)/srb/home//
where $e/@objtype = file and
contains($e/@name like, protein) and
contains($e/@owner, john)
return <datasrc>SRB</datasrc><dataname>$e/@name</dataname>
Jing, Would you provide some examples (or info) regarding searching in
metacat?
And We also can start with designing a XML schema for whole EcoGrid data
model
based on following (roughly).
EcoGrid
Metacat
SRB
collection (attribute: objtype, time, owner,
)
dataset (attribute: objtype, time, owner, size, container,
resource,
)
user-defined metadata
other data source
Cheers,
Bing
=====================================================
Bing Zhu
San Diego Supercomputer Center
bzhu at sdsc.edu
(858)534-8373
=====================================================
More information about the Seek-dev
mailing list