Hi Christian,
The properties I'm storing/planning for in my ancillary database are:
- dateTime the source document was loaded to BaseX - sha1 hash of the source document - used in determining if the source document has changed and should be replaced in BaseX - identifiers assigned by our content management system and archive - path to the source document - filename of the source document
These properties could be stored using strings for keys and values.
An extension to db:list-details(), with a method like db:store-details(),to allow setting and retrieving user-defined properties would work. A more extensive set of features as Marc described based on Qizx would also work and could support a larger variety of cases.
The ability to access these methods via a Java API or the BaseXClient API would be useful. Although, presumably a simple wrapper could be employed with the existing APIs to access the XQuery methods for querying and setting properties.
Thanks, Vincent
-----Original Message----- From: Christian GrĂ¼n [mailto:christian.gruen@gmail.com] Sent: Friday, August 29, 2014 6:33 AM To: Lizzi, Vincent Cc: Marc van Grootel; BaseX Subject: Re: [basex-talk] db documents metadata
@Marc:
For BaseX 8.0, we are planning to speed up our document index, and we could possibly enrich it with some more (possibly user-specific) metadata. I have added a reference to this mailing-list thread in the correspondent GitHub issue [1].
However, I am not sure if we should extend in our existing APIs. Maybe it would be more consistent to provide an additional XQuery Module for that, or extend the Database Module. Additional metadata could be returned via db:list-details(), and we could an updating function, sth. like db:store-details(). What do you think? Any more suggestions are welcome.
@Vincent:
I've started to implement along these lines by creating a second database to hold metadata about documents in the actual database. If there is a better option I'll switch to it.
I would be interested which metadata properties you currently storing in this auxiliary database?
Thanks, Christian
[1] https://github.com/BaseXdb/basex/issues/804
I would find this feature useful for several similar scenarios. I want to use BaseX for querying XML documents and keep BaseX synchronized with external archives/repositories where the XML files are maintained.
Vincent
From: basex-talk-bounces@mailman.uni-konstanz.de basex-talk-bounces@mailman.uni-konstanz.de on behalf of Marc van Grootel marc.van.grootel@gmail.com Sent: Thursday, August 28, 2014 5:38 PM To: BaseX Subject: [basex-talk] db documents metadata
Hi,
I was looking through the feature list in the issue tracker to see what's in the pipeline. I suddenly remembered a feature from an xml database I used a couple of years ago called Qizx. This had a very neat feature where every database document and collection could have a special map with metadata properties. These do not affect the XML content in any way but they can be accessed via special API calls or Qizx specific extension module.
A better explanation of this feature can be read in the Qizx manual (for example here http://kiwi.emse.fr/DN/qizx-manual.pdf on page 18 and 57).
I have used such metadata properties on nodes to implement syncing XML documents in a SCM (Subversion). I stored revision id's and other SCM control data in those properties. Authors would work in Subversion and certain directories where kept synced to a Qizx database so we could easily create PDF publications of the latest XML with zero impact on the XML itself.
Maybe BaseX already uses something like that under the hood, I don't know. If so extending it or opening it for use would be useful I think, and generally cool :-)
-- --Marc