Database Reference
In-Depth Information
In addition, your own application may require you to explicitly lock
documents—for example, to stop two users in an XForms application from
simultaneously editing the same document.
Retrieval
Users retrieving documents directly by URI may not wish to retrieve an entire
large document if they are concerned only with a small portion of its informa‐
tion. To a certain extent, you can mitigate this by placing a virtual URI space
over the database by using XQuery with URL rewriting or RESTXQ, which then
just returns a specific portion of the document. However, using URL rewriting or
RESTXQ adds complexity, so if your data architecture doesn't require this, things
will be much simpler for you without them.
All that being said, we advise you to make decisions about document granularity
based on your domain model. Most importantly, ask yourself, “What do we think of
as a document?” Typically the technology concerns can be solved later.
Each document in eXist has a filename and a URI, the latter of which is made up of
the collection URI and the filename of the document. Documents, like collections,
also maintain a small set of metadata, as Table 4-2 shows.
Table 4-2. Document metadata properties
Metadata property
Description
The filename of the document in the database
Name
Created Date
The date and time the document was created
Last Modified Date
The date and time the document was last modified
Internet Media Type
The Internet media type of the document
Permissions
Owner
The owner user of the document
Group
The owner group of the document
Mode
The security mode of the document (e.g., rwxr-xr-x )
Access Control List
The access control list for the document
Dynamic Level Numbering of Nodes
You have already seen in “XML Document Storage and Indexing” on page 72 that
while, as a user of eXist, you are working with XML documents (and the nodes from
those documents), eXist itself does not work with the textual XML document you
provided it, but rather with computationally-optimized model of that document.
XML documents themselves are constructed from nodes, and at the very core of
everything that eXist does with nodes is DLN (dynamic level numbering). DLN ena‐
 
Search WWH ::




Custom Search