Merging databases?

Friday, 24 July 2015 · 1 message
EK
Eliot Kimber24 Jul 2015 23:40 #
If there's to better way you should be able to simply copy the docs without first exporting them:
For $dbname in $dbNames
    Return
     Let $docs := collection($dbname)
     For $doc in $docs
         db:add($newDbName, $doc, $local:makeNewDocUrl($doc))
Or something close to that Cheers, Eliot ---- Eliot Kimber, Owner Contrext, LLC http://contrext.com On 7/24/15, 2:30 PM, "Amanda Galtman" <basex-talk-bounces at mailman.uni-konstanz.de on behalf of
Quoted text · 19 lines
Amanda.Galtman at mathworks.com> wrote: >Hi, > >Is there a simple, fast way to merge databases? For example, suppose I >have 200 databases, each with 5 XML documents, and the document paths are >unique across all the databases. I want to produce a database containing >all 1000 documents. > >I looked in the Database Module wiki and nothing jumped out as being >uniquely tailored for this task. I¹m sure there is an ad hoc way to do it >by looping over the documents in the databases, exporting them, and >adding them to the new database. > But if that takes the same amount of time as building the 200 databases >in the first place, I should change other things about my design to avoid >the need to merge databases. > >Thanks, >Amanda >

⚡Generated with XQuery