A collection in RavenDB is a set of documents tagged with the same @collection metadata property.
Every document belongs to exactly one collection.
Being a schemaless database, there is no requirement that documents in the same collection will share the same structure,
although typically, a collection holds similarly structured documents based on the entity type of the document.
The collection is just a virtual concept.
There is no influence on how or where documents within the same collection are physically stored.
Collections are used throughout many RavenDB features, such as defining indexes, setting revisions, and much more.
The collection metadata is generated based on the document ID prefix.
e.g Documents that are created with the following IDs: users|23 / users/45 / users/17
will all belong to the same Users collection.
RavenDB keeps an internal storage index per collection created.
This internal index is used to query the database and retrieve only documents from a specified collection.
Each Map Index is built against a single collection (or muliple collections when using a Multi-Map Index.
During the indexing process, the index function iterates only over the documents that belong to the specified collection(s).
Documents Revisions can be defined per collection.