Hello,
I would be interested to know why you want to do that? I could imagine this being relevant when restructuring/refactoring your data, but given that you mention your design, it sounds like it is a recurring occurence. I currently can't imagine why you want to do that, given that you can access as many databases as you want using a single XQuery.
Cheers Dirk
On 07/24/2015 09:40 PM, Eliot Kimber wrote:
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@mailman.uni-konstanz.de on behalf of Amanda.Galtman@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