query across multiple databases.

Wednesday, 27 August 2014 · 4 messages · last reply 28 Aug 2014
KC
Kunal Chauhan27 Aug 2014 16:33 #
Hello, I want to fire an XQuery across multiple databases. how to achieve this ?
-- *Kunal Chauhan* mail4ck at gmail.com [+918655517141]
CG
Christian Grün27 Aug 2014 16:54 #
Hi Kunal, the easiest solution is to check our documentation... ;) http://docs.basex.org/wiki/Databases http://docs.basex.org/wiki/Database_Module#db:open Best, Christian
KC
Kunal Chauhan28 Aug 2014 09:15 #
Hi Christian, Thanks for sharing the documentation link. :) I have gone through the documentation and reach to the conclusion that we can fire XQueries only on one DB at a time. we cannot run query across the DBs. *For eg.* I am maintaining two DBs. DB 1: contains schema files. DB 2: contatins corresponding xmls. I wont be able to fire a query obtaining datatype of an element which are specified in an xmls. ("let $ele := transaction/*[name() ne 'traInfo'] return xs:schema/xs:element[@name = $ele/local-name() and @type = 'xs:string']") Above query will return all the elements defined in xml file which are of string datatype. please correct me if I am wrong. Thanks, Kunal
Quoted text · Christian Grün · 12 lines
On Wed, Aug 27, 2014 at 8:24 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Kunal, > > the easiest solution is to check our documentation... ;) > > http://docs.basex.org/wiki/Databases > http://docs.basex.org/wiki/Database_Module#db:open > > Best, > Christian >
-- *Kunal Chauhan* mail4ck at gmail.com [+918655517141]
CG
Christian Grün28 Aug 2014 23:49 #
Did you try db:open()? Best, Christian
Quoted text · Kunal Chauhan · 48 lines
On Thu, Aug 28, 2014 at 9:15 AM, Kunal Chauhan <mail4ck at gmail.com> wrote: > Hi Christian, > > Thanks for sharing the documentation link. :) > > I have gone through the documentation and reach to the conclusion that we > can fire XQueries only on one DB at a time. we cannot run query across the > DBs. > > For eg. > I am maintaining two DBs. > DB 1: contains schema files. > DB 2: contatins corresponding xmls. > > I wont be able to fire a query obtaining datatype of an element which are > specified in an xmls. > ("let $ele := transaction/*[name() ne 'traInfo'] return > xs:schema/xs:element[@name = $ele/local-name() and @type = 'xs:string']") > > Above query will return all the elements defined in xml file which are of > string datatype. > > please correct me if I am wrong. > > Thanks, > Kunal > > > On Wed, Aug 27, 2014 at 8:24 PM, Christian Grün <christian.gruen at gmail.com> > wrote: >> >> Hi Kunal, >> >> the easiest solution is to check our documentation... ;) >> >> http://docs.basex.org/wiki/Databases >> http://docs.basex.org/wiki/Database_Module#db:open >> >> Best, >> Christian > > > > > -- > Kunal Chauhan > mail4ck at gmail.com > [+918655517141]

⚡Generated with XQuery