Databases

Databases are defined as documents of type database. Databases exist within the system-global root database context.

Aside from keys, all other documents exist within the context of a specific database. All queries are limited to a single database as well, and cannot span across databases.

It is possible to rename a database by updating its name field. Renaming a database changes its ref, but preserves inbound references to the database. The data within a database remains accessible via existing keys.

When a database is deleted, its associated data becomes inaccessible and is deleted asynchronously.

Field Type Definition and Requirements

name

Cannot be events, sets, self, documents, or _.

api_version

The default API version for requests made to this database. Defaults to 2.7.

priority

A priority between 1 and 500, inclusive. Defaults to 1.

The priority option is deprecated as of release 2.10.0. You should avoid specifying priority. In some future FaunaDB release, priority will be removed. See Deprecations for more details.

data

A JSON object. Optional.

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!