Merging databases?
Friday, 24 July 2015 · 1 message
DK
Dirk Kirsten24 Jul 2015 22:40 #
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
Quoted text · Eliot Kimber · 48 lines
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 at mailman.uni-konstanz.de on behalf of > 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 >> >
--
Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
| Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
Written for BaseX 8.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery