Hi Fabrice,
Can pre values change in add-documents-only databases ?
using the latest version of BaseX (maybe also with 7.3 or previous versions? I don’t remember), pre values for existing documents will never change, even if you add new documents.
This is not valid, however, in the second case you mentioned:
Can pre values change in add/delete-documents-only databases ?
The reason can be explained by picking up your third question:
Where pre are pre values in the Document DB.
Pre values are not stored in the database; instead, they are implicitly given by the table position of node entries [1]. If a document is deleted, the pre values of all subsequently stored documents will automagically decrease.
As a consequence…
Do I have to use id values or can I use pre values ?
…this simply depends on your use case ;)
Christian