Using the GUI interface to BaseX 7.2, when I select Database / Open and Manage ..., I get a list of the databases I have built over the time I've been using BaseX. When I try to open the collection named MEP.bigbooks, though, I get an error box saying "Name 'MEP.bigbooks' is invalid."
In the "Manage Databases" dialog box, the information about the collection appears normal and plausible (at least, the size is about what I expect, and so on). It's only when I try to open the collection that I run into the error. I get similar errors on other collections which have . in their name; I do not get errors when opening other collections built (as far as I can remember) at the same time from the same data, if their name does not include a full stop.
When I try renaming the collection without the full stop, I get the same error message.
When I try to issue the command
ALTER DATABASE MEP.bigbooks MEPbigbooks
from the server command area of the GUI, I get a short syntax summary in the Query Info area complaining about the syntax of the command. When I replace MEP.bigbooks with MEP.bigbooks and "MEP.bigbooks", I also get syntax errors.
If I close the GUI and just rename the directory within my BaseXData directory, the database appears to open normally.
I think I have two questions:
Q1 is just renaming the directory a safe way (assuming no server is currently working with the data) to rename a collection? Should I do the same for all the other collections I have that don't currently open?
I assume that if the 7.2 GUI won't let me rename them, it also will have trouble deleting them, so a related question is: is just deleting a sub-directory of BaseXData a safe way to delete a collection?
Q2 Did the rules for names of collections change? Or is there some other cause?
Speaking for myself, I guess that as a user I haven't thought much about what characters should be allowed in collection names, but I may have assumed that if they are not unrestricted, they would be restricted to being legal NCNames. I do kind of like using dots in names, so you can count this as one vote for relaxing the naming rules at some convenient moment. It's not a really important point, of course.
best,
Michael
Dear Michael,
On Fri, Apr 6, 2012 at 2:10 AM, C. M. Sperberg-McQueen cmsmcq@blackmesatech.com wrote:
Using the GUI interface to BaseX 7.2, when I select Database / Open and Manage ..., I get a list of the databases I have built over the time I've been using BaseX. When I try to open the collection named MEP.bigbooks, though, I get an error box saying "Name 'MEP.bigbooks' is invalid."
some minor versions ago, we restricted names of database to letters, digits, dashes and underscores [1], mainly to avoid some existing ambiguities. The most prominent example was/is the .logs directory. It contains all log files while, in former times, it could also have pointed to a database. I mus confess that we have neglected legacy issues caused by this decision -- probably mainly because we've just not been aware of it.
It seems I have already answered your second question on the rules of database/collection names; some more information on how collections and databases can be addressed is given at [2]. Regarding your first question: yes, it is absolutely safe to simply rename database directories in your file system -- at least as long as you no BaseX instance is running, as the existing databases are cached in main memory after starting an instance.
Last but not least, I agree that it would probably be more intuitive if the database were not restricted to simple letters and digits. This may get possible at some stage, if we should decide to squeeze in another collection ↔ database layer.
Hope this helps! Some more nocturnal greetings, Christian
[1] http://docs.basex.org/wiki/Commands#Valid_Names [2] http://docs.basex.org/wiki/Databases
Dear Michael,
it has been a while, but it may interest you that we have relaxed the naming convention for database, user and event names [1]. Dots are still reserved for hidden directories, though.
We are working on the namespace issue that you mentioned recently.
Best regards, Christian
[1] http://docs.basex.org/wiki/Commands#Valid_Names ___________________________
Speaking for myself, I guess that as a user I haven't thought much about what characters should be allowed in collection names, but I may have assumed that if they are not unrestricted, they would be restricted to being legal NCNames. I do kind of like using dots in names, so you can count this as one vote for relaxing the naming rules at some convenient moment. It's not a really important point, of course.
basex-talk@mailman.uni-konstanz.de