duplicated document in collection

Thursday, 14 July 2011 · 2 messages
CG
Christian Grünin reply to Craig Venter, 14 Jul 2011, 18:5814 Jul 2011 17:07 #
Craig, hi again, this time for everyone (thanks for sending this to the list)..
Quoted text · Craig Venter · 7 lines
> I am trying BaseX 6.7 and have noticed that the same document can be added > to a collection many times using the ADD command (add z.xml), duplicating > data wich is not desirable. Is this a bug of this version? > In comparison, using Sedna 3.4, the same document can not be added to a > collection if it already exists, treating document names as primary key. > Is there a solution to this, or is there a way in BaseX 6.7 to have a kind > of primary key constraint?
in BaseX, multiple documents with the same name are allowed in a single database (the handling of collections in XQuery is completely implementation defined). If you want to get sure that your document will be deleted before an addition, you may use the DELETE command in advance. Christian
CV
Craig Venter14 Jul 2011 18:58 #
Hello, I am trying BaseX 6.7 and have noticed that the same document can be added to a collection many times using the ADD command (add z.xml), duplicating data wich is not desirable. Is this a bug of this version? In comparison, using Sedna 3.4, the same document can not be added to a collection if it already exists, treating document names as primary key. Is there a solution to this, or is there a way in BaseX 6.7 to have a kind of primary key constraint? Thank you.

⚡Generated with XQuery