Christian -
Thank you for your kind response, although I remain uncertain about the first question. Suppose that I had the requirements that a database needed to allow concurrent access of many users for read/update. For this purpose, would it be better to have a collection of small XML documents or would one large XML document work?
In other words, how does the concurrent update of one large XML document perform?
Garey
On 9/24/2012 6:27 PM, Christian GrĂ¼n wrote:
Dear Garey,
would it be better to have a collection of small XML
documents, one to each user; or does BaseX provide the concurrent access control to allow me to have one document with any number of user records?
the transaction management of BaseX will ensure that there won't be any conflicts while performing updates, no matter how many collections/databases you use for your data. Size matters, however: if a single collection is expected to occupy several gigabytes, it's often wise to split it up into several database instances to speed up querying and indexing.
Second question: I seen in the Java API examples how to create a new
database, but I don't see an easy way to check if a database exists. Does that mean, then, that I should create the databases beforehand and then assume they exist inside my application?
Exactly; as most XQuery functions assume that the processed databases already exist, the usual approach is to first create databases and access them after that. If you want to check if a database exist, you can e.g. use the LIST command, db:list(), or db:open(), surrrounded by a try/catch statement in XQuery.
My apologies in advance, since I am sure these question have been asked
before. The list archive search function on the BaseX site is not working.
No problem, your questions are always welcome. I've updated the mailing list links to point to the Mail Archive, which will be frequently updated [1].
Christian
[1] http://www.mail-archive.com/basex-talk@mailman.uni-konstanz.de/