basex

Can a BaseX database span multiple folders?


New to BaseX. Working on a project where 100's or sometimes 1000's of XML files are generated each day. Due to other exogenous factors, the preferred file structure would look like:
 blah/20220714/
 blah/20220715/
 etc…

Is there some way to create this database architecture in BaseX?

In the documentation, a single folder seems to be the only option: “CREATE DB db /path/to/resources will add initial documents to a database”. It seems there is an ‘ADD’ command available to append files to the database; could this theoretically be run each day to append the new folder that gets created?


Solution

  • You can use CREATE DB to create an empty database or a database with an initial set of documents. If you have a fixed set of resources that you want to import, it’s faster to use this bulk import feature than adding the documents in a second step.

    With ADD, you can import additional files, directories, remote source, etc. later on, whenever you like.