Create a database using the Fauna Dashboard

This tutorial is the first part of a series that shows you how to quickly set up and run a Fauna database using the Fauna Dashboard. For an overview of the series, see Get started with the Fauna Dashboard.

In this tutorial, you’ll use the Fauna Dashboard to create a database. You’ll also learn how to use the Fauna Query Language (FQL) to query your database.

Create a database

Fauna databases are easy to set up and fully managed — no provisioning, capacity planning, or operational overhead required.

The Fauna Dashboard includes a database with sample e-commerce data. To create a database with the demo data:

  1. Log in to the Fauna Dashboard

  2. Create a database with the following configuration:

    • Region group: Choose your preferred region group to determine where your data resides.

    • Use demo data: Enabled.

    • Enable backups: Disabled.

    Leave the other options as is.

Create demo database

You can also create databases using the Fauna CLI and FQL queries. See Create and manage databases.

Run an FQL query

You use FQL queries to read and write data in a Fauna database.

Fauna stores data as JSON-like documents, organized into collections. Queries can filter and retrieve documents from a collection as a Set, and iterate through each document.

To test it out, run the following query in the Shell tab of the database you just created:

// Uses `all()` to retrieve the `name`,
// `description`, and `price` field values
// for all `Product` collection documents.
// In production, use an index for better
// performance.
Product.all() { name, description, price }

The query fetches all documents from the Product collection as a Set:

Run an FQL query in the Dashboard Shell

Next steps

Congratulations! You’ve created a Fauna database and ran an FQL query.

In the next tutorial, you’ll add your own data — as a collection and documents — to the database. You’ll also use database schema to define a structure for the collection.

 

Create a collection and documents using the Fauna Dashboard.

\