Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion site/content/3.10/concepts/data-structure/documents/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,17 @@ Example document:
All documents contain special attributes at the top-level that start with an
underscore, known as **system attributes**:

- The **document identifier** is stored as a string in the `_id` attribute.
- The **document key** is stored as a string in the `_key` attribute.
- The **document identifier** is stored as a string in the `_id` attribute.
- The **document revision** is stored as a string in the `_rev` attribute.

You can specify a value for the `_key` attribute when creating a document.
The `_id` attribute is automatically set based on the collection and `_key`.
The `_id` and `_key` values are immutable once the document has been created.
The `_rev` value is maintained by ArangoDB automatically.

Edge documents in edge collections have two additional system attributes:

- The document identifier of the source vertex stored in the `_from` attribute.
- The document identifier of the target vertex stored in the `_to` attribute.

Expand All @@ -80,6 +82,9 @@ you should avoid using own attribute names starting with an underscore.
Each document has a unique **document key** (or _primary key_) which identifies
it within its collection.

To distinguish between documents from multiple collections, see
[Document identifiers](#document-identifiers).

A document key uniquely identifies a document in the collection it is
stored in. It can and should be used by clients when specific documents
are queried. The document key is stored in the `_key` attribute of
Expand Down Expand Up @@ -157,6 +162,10 @@ forward slash (`/`), like `collection-name/document-key`.
See [Collection names](../collections.md#collection-names) and
[Document keys](#document-keys) for information about the allowed characters.

When working with documents from multiple collections, you can see what
collections they are from by looking at the `_id` attribute values and tell
documents from different collections but the same keys apart.

### Document revisions

Every document in ArangoDB has a revision, stored in the system attribute
Expand Down
Loading