BaseX "subcollections"

Wednesday, 12 August 2015 · 4 messages · last reply 13 Aug 2015
TT
Tim Thompson12 Aug 2015 21:15 #
Hello, I see that I can create subcollections or paths within a database if I create the database then use the "ADD TO" command to add a resource at a specified path. Is this the only way to create hiearchical structure within a database? I couldn't find many details about this in the documentation. I see that the changelog for BaseX 6.3.1 includes, [ADD] REST: support for hierarchical collections added; details will follow, but I don't see anything about this in the wiki page for the REST module. Thanks in advance, Tim
-- Tim A. Thompson Metadata Librarian (Spanish/Portuguese Specialty) Princeton University Library
DK
Dirk Kirsten13 Aug 2015 12:07 #
Hello Tim, I am not sure I understand your question completely. Basically every way how you can add a document to a database you can specify a path, e.g. using the XQuery database module or by using the CREATE document to create a new database and initialize it. Is there anything specific you are looking for? Also, please not that BaseX 6.3.1 is _very_ outdated... I don't think you can find much valuable information there except looking for the history of BaseX. Cheers Dirk
Quoted text · Tim Thompson · 21 lines
On 08/12/2015 07:15 PM, Tim Thompson wrote: > Hello, > > I see that I can create subcollections or paths within a database if I > create the database then use the "ADD TO" command to add a resource at > a specified path. Is this the only way to create hiearchical structure > within a database? I couldn't find many details about this in the > documentation. > > I see that the changelog for BaseX 6.3.1 includes,[ADD] REST: support > for hierarchical collections added; details will follow, but I don't > see anything about this in the wiki page for the REST module. > > Thanks in advance, > Tim > > -- > Tim A. Thompson > Metadata Librarian (Spanish/Portuguese Specialty) > Princeton University Library >
-- Dirk Kirsten, BaseX GmbH, http://basexgmbh.de |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
TT
Tim Thompson13 Aug 2015 21:13 #
Thanks, Dirk. Basically, I just want to create hierarchical collections within a database, with some subcollections being possible empty. But if I do CREATE DB parent, I'm not able to follow that with something like, CREATE DB parent/child. Is this possible by other means? (Sorry for the newbie question; I'm still getting familiarized with how things work in BaseX.) Tim
-- Tim A. Thompson Metadata Librarian (Spanish/Portuguese Specialty) Princeton University Library
Quoted text · Dirk Kirsten · 46 lines
On Thu, Aug 13, 2015 at 6:07 AM, Dirk Kirsten <dk at basex.org> wrote: > Hello Tim, > > I am not sure I understand your question completely. Basically every way > how you can add a document to a database you can specify a path, e.g. using > the XQuery database module or by using the CREATE document to create a new > database and initialize it. Is there anything specific you are looking for? > > Also, please not that BaseX 6.3.1 is _very_ outdated... I don't think you > can find much valuable information there except looking for the history of > BaseX. > > Cheers > Dirk > > > On 08/12/2015 07:15 PM, Tim Thompson wrote: > > Hello, > > I see that I can create subcollections or paths within a database if I > create the database then use the "ADD TO" command to add a resource at a > specified path. Is this the only way to create hiearchical structure within > a database? I couldn't find many details about this in the documentation. > > I see that the changelog for BaseX 6.3.1 includes, [ADD] REST: support > for hierarchical collections added; details will follow, but I don't see > anything about this in the wiki page for the REST module. > > Thanks in advance, > Tim > > -- > Tim A. Thompson > Metadata Librarian (Spanish/Portuguese Specialty) > Princeton University Library > > > -- > Dirk Kirsten, BaseX GmbH, http://basexgmbh.de > |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz > |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: > | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle > `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 > >
CG
Christian Grün13 Aug 2015 21:36 #
Hi Tim, There is no fixed collection layer in BaseX. However, a single database can contain millions of documents with arbitrary paths, and you can always specify target paths when adding or replacing documents. This also applies if you add more than one file at a time: OPEN db1 ADD TO /colls/coll1 c:/xml/files/on/my/disk …or via XQuery (and binary resources):
  for $f in file:children('c:/users/user/desktop')
  return db:store('db1', 'coll/' || file:name($f), file:read-binary($f))
Our documentation on databases may shed some more light on this [1]. Best, Christian [1] http://docs.basex.org/wiki/Databases
Quoted text · Tim Thompson · 62 lines
On Thu, Aug 13, 2015 at 7:13 PM, Tim Thompson <timathom at gmail.com> wrote: > Thanks, Dirk. Basically, I just want to create hierarchical collections > within a database, with some subcollections being possible empty. But if I > do CREATE DB parent, I'm not able to follow that with something like, CREATE > DB parent/child. Is this possible by other means? (Sorry for the newbie > question; I'm still getting familiarized with how things work in BaseX.) > > Tim > > -- > Tim A. Thompson > Metadata Librarian (Spanish/Portuguese Specialty) > Princeton University Library > > > On Thu, Aug 13, 2015 at 6:07 AM, Dirk Kirsten <dk at basex.org> wrote: >> >> Hello Tim, >> >> I am not sure I understand your question completely. Basically every way >> how you can add a document to a database you can specify a path, e.g. using >> the XQuery database module or by using the CREATE document to create a new >> database and initialize it. Is there anything specific you are looking for? >> >> Also, please not that BaseX 6.3.1 is _very_ outdated... I don't think you >> can find much valuable information there except looking for the history of >> BaseX. >> >> Cheers >> Dirk >> >> >> On 08/12/2015 07:15 PM, Tim Thompson wrote: >> >> Hello, >> >> I see that I can create subcollections or paths within a database if I >> create the database then use the "ADD TO" command to add a resource at a >> specified path. Is this the only way to create hiearchical structure within >> a database? I couldn't find many details about this in the documentation. >> >> I see that the changelog for BaseX 6.3.1 includes, [ADD] REST: support for >> hierarchical collections added; details will follow, but I don't see >> anything about this in the wiki page for the REST module. >> >> Thanks in advance, >> Tim >> >> -- >> Tim A. Thompson >> Metadata Librarian (Spanish/Portuguese Specialty) >> Princeton University Library >> >> >> -- >> Dirk Kirsten, BaseX GmbH, http://basexgmbh.de >> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz >> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: >> | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle >> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 > >

⚡Generated with XQuery