Glossary

A

AccessProvider

The AccessProvider document configures one-half of the relationship required to access authentication information from an external identity provider. The other half of the relationship is configured in the identity provider.

reference: AccessProvider

ABAC

Attribute-based access control.

ACID

The guarantee that every transaction includes atomicity, consistency, isolation, and durability.

Ad hoc field

An arbitrary document field. Ad hoc fields don’t have a field definition. You allow and disallow ad hoc fields using a wildcard constraint.

Anonymous function

An anonymous function is a function without a name. Many built-in methods accept an anonymous function or predicate as a parameter, such as where() and map(). FQL uses the JavaScript arrow function syntax to define an anonymous function.

Atomicity

The guarantee that each transaction is treated as a single block of work, which succeeds or fails in its entirety.

C

Cardinality

Cardinality refers to the number of elements in a set or group as a property of that group. Low cardinality refers to a small number of distinct items, whereas high cardinality refers to many items. For example, a Boolean field has a cardinality of 2, which is low.

Catch-all field

A document field used to store non-conforming field values during a schema migration.

Check constraint

See Constraints

Child database

See Database.

Collection

A collection is a container for documents, imposing no structure on those documents. Documents in a collection usually have a common structure, but this constraint isn’t required. A collection is equivalent to a traditional database table without a structured schema and has the following attributes:

  • A set of documents that are persisted to storage and on which a common set of indexes are built.

  • Has the methods and properties of the Collection type.

  • Can be serialized as a JSON object. The JSON object conforms to the shape of the Collection schema type and includes the collection type schema and optional index definitions. The JSON object can be persisted in the Collection System collection.

  • Documents persisted in the database are of a type named after that collection name. For example, documents that persist the Author collection are instances of the Author type. A document can be persisted to a collection if the document adheres to that collection type schema.

  • The natural order of documents persisted in a collection is by id order when performing a full scan.

reference: Collection

CollectionDef

A SchemaDef document subtype that represents a Collection schema type. A CollectionDef can be persisted in a System collection.

Collection schema

A schema that defines the structure and behavior of a collection.

Collection type

A Collection type has a CollectionDef document stored in a database and has properties and methods that give ways to query, create, and mutate documents present in the collection. Documents persisted to a Collection type are said to be of a type name after that collection name.

A System collection is a special instance of the Collection type where database schema elements are persisted as Schema type definitions.

Computed field

A document field whose value is computed when the document is read instead of storing the field value in the document, itself.

Computed field definitions are part of a collection schema's document type.

Consistency

Consistency is the promise that any data written to the database must be valid according to all defined rules, such as unique indexes.

Cursor

A cursor marks a position in a paginated Set. When you paginate a Set and the total number of results exceeds the current page size, an after cursor is returned that marks the location of the next page of results. You use the after cursor in subsequent calls to Set.paginate() to request the next page of results.

Constraints

A unique constraint allows you to define which Document field values must be unique in a Collection. A unique constraint can define one or more fields that must be unique in combination. For example, if firstName and lastName fields are included in a unique constraint definition, the first and last name combination must be unique in the collection.

A check constraint allows you to define predicates that control whether a document is written to a collection.

D

Database

A database can have collections, documents, user-defined functions (UDFs), security elements such as keys, tokens, credentials, access providers, and child databases.

Databases can be hierarchical, with multiple child databases, each with its separate permission and security settings. This structure is ideal for multitenancy. See Multitenancy

reference: Database

DatabaseDef

A SchemaDef document subtype that represents a Database schema type. A DatabaseDef can be persisted in a System collection.

Document

A document is a single, changeable record in the Fauna database. The equivalent term in other database systems is a row.

A document represents a nested structure of fields and their values. You can enforce a structure for a document using a collection schema's document type.

Also, documents are versioned, storing the document history of mutations from creation to deletion. A document update results in a new version of the document. Document creation, change, or deletion events are assigned a transaction timestamp and inserted in the document history. Approaching documents temporally enables event sourcing, reactive programming, and various audit and stream-oriented data architectures.

A document is a Document type and has the following attributes:

  • a unique id

  • coll and ts metadata fields

  • update(), replace(), and delete() member methods

reference: Document

Document ID

An ID is a 64-bit unsigned integer that uniquely identifies a document. A document can be referenced by its ID using the byId() method.

See also:
      create()
      ID()
      newId()

Document type

The data type of a collection's documents. The type takes its name from its collection. For example, documents in the Product collection have a type of Product.

You define a document type in a collection schema using:

Document type enforcement

The process of ensuring a collection’s documents conform to a predefined structure.

Durability

Durability guarantees that after a transaction is committed, it is permanent. If a system crash, power failure, or other unexpected failure occurs, all committed transactions are saved.

E

Endpoint

FSL endpoint:
An FSL endpoint is a property in the .fauna-project configuration file that is the secret to use when running schema commands. See project.

CLI endpoint:
One or more connection endpoints, which can be configured in the fauna-shell. A CLI endpoint defines the domain, secret, and other properties needed to query a Fauna instance.

environment

An environment is an instance of your project that can be mapped to an environment, such as dev, preview, or prod. A project typically has multiple environments.

Extended type, Intelligent type

A scalar value that can be instantiated and persisted in a document, which has static functions associated with it, but can’t be directly serialized into a JSON type without information loss. These must be serialized with metadata that identifies the type they represent. Examples include Date and String types.

F

Field

The generic term for a property in an object.

Field definition

Defines a field for a collection’s documents. Consists of the field name, accepted data types, and default values.

Field definitions are part of a collection schema's document type.

FQL

Fauna Query Language (FQL) is a NoSQL query language that combines the productivity and flexibility of a general-purpose programming language with purpose-built features that enable developers to take advantage of the unique Fauna properties. FQL is similar to JavaScript with influences from TypeScript and GraphQL. The language differs from these languages to the extent that it is optimized for database applications.

FSL

Fauna Schema Language is a declarative language that enables you to define database entities, including Collections, Indexes, Unique Constraints, Functions, AccessProviders, and Roles.

Function

See Anonymous function, which is a User-defined function.

A Function can also refer to a database entity with built-in methods and properties. See Function

FunctionDef

A SchemaDef document subtype that represents a function schema type. A FunctionDef can be persisted in a System collection.

I

identity document

A document that’s tied to a token and represents an end user, system, or other identity. Identity documents are stored in user-defined collections.

You can use an identity document’s attributes for attribute-based access control (ABAC).

See Tokens
Identity provider, IdP

An identity provider is a system that creates, maintains, and manages identity information and provides authentication and authorization services. For more information, see Auth0.

Index

An index is a database entity that facilitates data lookup. Indexes are used to find data without searching every document in a collection and to sort documents by their field values.

reference: Indexes definition

Index term

See Terms.

Index value

See Values.

J

JSON

JSON (JavaScript Object Notation) is a lightweight, data interchange format. A human-readable, plain-text format for expressing structured data. For more information, see reference:http///www.json.org/[^].

JSON Web Token, JWT

A JSON Web Token (JWT) is a digitally signed object, which is typically used to communicate verified and trusted information about a user to indicate that a user has authenticated. For more information, see https://jwt.io/introduction/.

M

Method chaining

A syntax for chaining calls to further refine and compose complex queries, which is similar to piping.

Method

A Field in an Object whose value is a function.

Migrations block

A group of migration statements in a collection schema. Used to perform schema migrations.

Migration statement

An imperative instruction to Fauna on how should handle updates to a collection schema's field definitions and wildcard constraint. Migration statements make up a migrations block.

Multitenancy

Multitenancy is the ability to have child databases in a Fauna database. Access keys for child databases can be distributed to multiple tenants, such as companies, applications, programmers, and users. Each child database is isolated from other databases, except for its child databases. Each tenant has complete administrative control, a private security model, and programmatic creativity over their databases, free of interference from users of other databases.

See also: Database

Multivalued attribute, MVA

A Terms or Values field that can have more than one value associated with it. See Indexes definition.

N

Named collection

A System collection subset, DatabaseDef, CollectionDef, FunctionDef, AccessProvider, Role, whose documents have names instead of IDs.

Native collection

See System collection.

O

Object

A value that consists of a set of fields. Object fields preserve creation order, and updating an existing object field maintains its position with new fields appended to the field set. Field order doesn’t affect equality, so two objects are considered equal if they have the same fields with the same values.

organizational account

The username/password combination used to sign up to Fauna. This account has administrator-equivalent access to every database in Fauna.

P

Pagination

Pagination chunks a large number of query results into pages. Using pagination, you can iterate through result sets in pages of a defined size. See Cursor.

project

A project is a directory that includes the configuration and all FSL files that define the schema. A project configuration is stored in the .fauna-project configuration file. See environment.

Projection

Queries can project select document fields in the query. A projection is a field selection mechanism that makes returned fields available in a new context.

Property

An object Field whose value isn’t a function.

R

Role

A role defines configurable domain security rules. Roles are the core ABAC schema, and can be assigned to User-defined functions for better security.

reference: Role

S

Schema

An FSL definition for a user-defined resource, such as a collection or user-defined role.

Schema definition document

Documents that define core features in a Fauna database, including Collection and Function.

Schema Collection

A special instance of the Collection type where all database schema elements are persisted as schema type definitions. You can add, change, and remove definitions contained in a System collection, but can’t add, remove, or change a System collection, itself.

SchemaDef

A document subtype that represents the definition of a named schema entity. A fixed family of SchemaDef document subtypes represents the different schema types and can be persisted in System collections. These include CollectionDef, FunctionDef, and DatabaseDef.

Schema Entity

A user database component, including database, child database, Collection, Index, User-defined function (UDF), Role, access provider, and other Fauna objects.

Schema migration

An update to a collection schema’s field definitions or wildcard constraint.

You perform a document type migration using migration blocks. Migrations require zero downtime.

Schema type

A fixed family of types of values that are used to manipulate database entities. Collection and Database are examples of schema types.

SchemaDef type

A document subtype that represents the definition of a named schema entity. The fixed family of SchemaDef subtypes that represent a schema type and can be persisted in a System collection are CollectionDef, FunctionDef, and DatabaseDef.

scoped key

An access key that is used to impersonate database access. Scoped keys are created from an existing key.

secret

A secret is a randomly generated cryptographic hash that is equivalent to a password. It is associated with a database and generated when you create the database. The secret is required to authenticate each database query so must be saved and protected in a secure location.

Set

A sorted group of objects derived from documents in a collection.

The Set object has built-in set methods.

System collection

A collection that stores built-in Fauna resources, such as functions or roles, as documents. Also called a native collection.

System collections have the following limitations:

  • You can create and manage system collection documents, but you can’t create, change, or delete a system collection itself.

  • You can’t change the field definitions of a system collection.

T

Terms

When you define an index, you can increase query performance by declaring a term, which directs the query engine to use only that part of the index needed to fulfill the query. If terms are defined for the index, you can use equality matches only on the terms of the index and can’t do range-based queries on the terms.

reference: Terms

Type

A defined set of possible values. Types can be built-in or a User-defined function in terms of other types. Examples are Boolean, Array<Boolean>, and { a: int, b: string }. Expressions and Values have an associated static type. The Any type is a special type that matches against all other types and acts as an escape from static type checking.

Type schema

See [collection-document-typedef].

U

Unique constraint

See Constraints

User-defined function

A named function defined by an FQL user to query a database.

V

Values

Values are an Array of zero or more field definitions for document values that are used to order index results.

reference: Values

W

Wildcard constraint

Part of a document type that allows or disallows ad hoc fields. It also controls accepted data types for ad hoc fields.

A wildcard constraint is part of a collection schema's document type.

Z

Zero-downtime migration

See Schema migration.

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!