Collections

A Collection groups documents in a database. In a relational database, a collection is called a table. Depending on your application requirements, you can organize your documents into one collection or several, and collections can be customized to retain document version history for as long as you want.

Collections exist as global values in the Fauna environment.

Each collection includes a definition document that defines the collection name and can optionally define indexes and other metadata. Top-level objects with the names of each collection exist so that operations on the collections and their documents can be performed. The top-level Collection object has methods that can manage collections.

A database may have zero or more user-defined collections, and a collection can have any number of documents.

Fauna provides a set of internal collections that can be used to manage database resources.

Collection schema

Reference: Collection schema

Each collection has a collection schema. The schema defines the structure and behavior of a collection and its documents.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!