Glossary

A    C    D    E    F    I    J    M    N    O    P    R    S    T    U    V

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.

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.

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 Native 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 Native collection.

Collection Document Type Definition

Also known as shape or type schema, a component of a collection definition, which is a set of field declarations that includes the name and type of each field and defines the document type persisted in the collection. For example, the Author Collection type definition defines the Author document type, which is persisted in the Author 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 Native collection is a special instance of the Collection type where database schema elements are persisted as Schema type definitions.

Computed field

The compute field defines document fields that are computed when the document is read instead of storing the field value in the document, itself. See collection.compute.

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, security elements such as Keys, Tokens, Credentials, Access Providers, and child databases.

A Fauna database has schemaless documents with no schema enforcement available at the document level.

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 Native 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, with no defined structure or types. Each document, even in the same collection, can have an independent structure. This makes Fauna documents schemaless.

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()

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.

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 Native collection.

I

identity document

A unique document in Fauna associated with a Token used in access control. Typically, an identity document represents a person who is a user but can also be a service, system, or process that needs access to resources.

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.

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 Native collection subset, DatabaseDef, CollectionDef, FunctionDef, AccessProvider, Role, whose documents have names instead of IDs.

Native collection

A special Collection type instance that can’t be dropped or modified. You can add definitions to a native collection, but those definitions must conform to the schemas of the DatabaseDef, CollectionDef, FunctionDef, AccessProvider, Role, Key, Token, and Credential types.

A native collection has the following constraints:

  • You can’t extend the set of schema types in the set of native collections beyond what Fauna has defined.

  • You can’t mutate a schema type schema definition.

  • You can insert, read, update, or delete documents in a native collection but can’t create, delete, or mutate a native 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 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 Native collection, but can’t add, remove, or change a Native 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 Native 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 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 Native 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.

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 Type Definition.

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

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!