Hi Christian,

Thank you very much for your reply!
As for path: A database is created from all files in a specific folder which has subfolders 'group1', 'group2' etc. and the path is derived from these subfolders of adding files to db?

With kind regards,
Menashè

On 05/12/2015 02:19 PM, Christian Grün wrote:
Hi Menashè,

Just use different database paths for each group (e.g. '/path1/' and
'/path2/'), and specify the sub path with db:open:

   db:open('db', '/path1')/...

You can also store the documents in two separate databases and use a
single XQuery expression to query all documents:

   for $db in ('db1', 'db2')
   return db:open($db)/...

Hope this helps,
Christian


On Tue, May 12, 2015 at 2:14 PM, Menashè Eliezer
<melie...@ogs.trieste.it> wrote:
Hello,
I have two groups of xml to be included in the same database.
Usually the same query will be performed on both of them, but I need to able
to query only one group.
The difference between the groups is known only to add the xml files, e.g.
the origin of the files. This information is not found inside the files, and
I prefer not modifying their content.

I was hoping to be able to define groups, using subfolders and base-uri or
multiple collections, but I know it's not possible using Basex.
Maybe I can tag them? The group type is both a property and a possible
filter in a query, so I need a good performance.

Right now I see two alternatives:
1. Using two separate databases. Once I need to query all files, I'll make
the same query on multiple databases...
2. One database, but a query to a new xml document, which includes list of
node-ids per group type, will be used both for knowing the type and for
querying a subset.

Any ideas, please?

--
With kind regards,
Menashè


Reply via email to