adding documents to a collection

Sunday, 19 February 2012 · 4 messages
CM
Cerstin Mahlow19 Feb 2012 17:51 #
Hi, I will implement a web interface to edit and update specific nodes in an existing database. This will probably be controlled mainly by the node-id. Therefore it is no good idea to change the collection during the editing process because node-ids would change. However, it seems that when adding a document to a collection it will be integrated *after* all existing documents. Is it guaranteed that when adding a new document to a collection, no existing node-ids are changed? I would have to re-index the collection when adding new documents. Best regards Cerstin
-- Dr. phil. Cerstin Mahlow Universität Basel Deutsches Seminar Nadelberg 4 4051 Basel Schweiz Tel: +41 61 267 07 65 Fax: +41 61 267 34 40 Mail: cerstin.mahlow at unibas.ch Web: http://www.oldphras.net ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
CG
Christian Grün19 Feb 2012 17:56 #
Hi Cerstin, correct, new documents will aways be added after the existing documents, which is why the existing node ids won't change. The ids returned by "node-id()" won't change, too, in contrast to the values returned by "node-pre()". Hope this helps, Christian
Quoted text · Cerstin Mahlow · 35 lines
> I will implement a web interface to edit and update specific nodes in an > existing database. This will probably be controlled mainly by the node-id. > Therefore it is no good idea to change the collection during the editing > process because node-ids would change. > > However, it seems that when adding a document to a collection it will be > integrated *after* all existing documents. Is it guaranteed that when > adding a new document to a collection, no existing node-ids are changed? I > would have to re-index the collection when adding new documents. > > Best regards > > Cerstin > -- > Dr. phil. Cerstin Mahlow > > Universität Basel > Deutsches Seminar > Nadelberg 4 > 4051 Basel > Schweiz > > Tel: +41 61 267 07 65 > Fax: +41 61 267 34 40 > Mail: cerstin.mahlow at unibas.ch > Web: http://www.oldphras.net > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
CM
Cerstin Mahlow19 Feb 2012 18:24 #
Hi Christian, Zitat von Christian Grün <christian.gruen at gmail.com>:
Quoted text · Christian Grün · 3 lines
> correct, new documents will aways be added after the existing > documents, which is why the existing node ids won't change. The ids > returned by "node-id()" won't change, too,
Perfect.
Quoted text · Christian Grün · 2 lines
> in contrast to the values > returned by "node-pre()".
What does "pre" stand for? Is this some kind of hash-table value? Cerstin
-- Dr. phil. Cerstin Mahlow Universität Basel Deutsches Seminar Nadelberg 4 4051 Basel Schweiz Tel: +41 61 267 07 65 Fax: +41 61 267 34 40 Mail: cerstin.mahlow at unibas.ch Web: http://www.oldphras.net ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
AH
Alexander Holupirekin reply to Christian Grün, 19 Feb 2012, 17:5619 Feb 2012 18:39 #
Hi Cerstin, BaseX’ storage layer uses a pre/distance/size encoding for XML data (see [1]). If you label the start elements during a pre-order traversal of an XML document you get the value stored in pre. The db command 'info storage' prints the pre/distance/size table for the current database. Cheers, Alex [1] http://cl.ly/2706070q3m0B013a2647
Quoted text · Christian Grün · 51 lines
On 19.02.2012, at 17:56, Christian Grün wrote: > Hi Cerstin, > > correct, new documents will aways be added after the existing > documents, which is why the existing node ids won't change. The ids > returned by "node-id()" won't change, too, in contrast to the values > returned by "node-pre()". > > Hope this helps, > Christian > ___________________________ > >> I will implement a web interface to edit and update specific nodes in an >> existing database. This will probably be controlled mainly by the node-id. >> Therefore it is no good idea to change the collection during the editing >> process because node-ids would change. >> >> However, it seems that when adding a document to a collection it will be >> integrated *after* all existing documents. Is it guaranteed that when >> adding a new document to a collection, no existing node-ids are changed? I >> would have to re-index the collection when adding new documents. >> >> Best regards >> >> Cerstin >> -- >> Dr. phil. Cerstin Mahlow >> >> Universität Basel >> Deutsches Seminar >> Nadelberg 4 >> 4051 Basel >> Schweiz >> >> Tel: +41 61 267 07 65 >> Fax: +41 61 267 34 40 >> Mail: cerstin.mahlow at unibas.ch >> Web: http://www.oldphras.net >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Alexander Holupirek |-- http://www.informatik.uni-konstanz.de/~holupire |-- Database & Information Systems Group, U Konstanz `-- Room E 221, 0049 7531 88 2188 (phone) 3577 (fax)

⚡Generated with XQuery