Fauna Schema Language quick start

This introduces you to the Fauna Schema Language (FSL) by using the Dashboard to view and change the demo data schema.

While you can use the Dashboard to manage and change schema, in practice, you want to integrate schema operations with your source code management tools, which you can do using the Fauna Shell.

Browse the schema in the Dashboard

This uses the Fauna demo data to walk you through basic operations on the supported schema elements.

  1. If you haven’t already done so in Fauna quick start, go to the Dashboard Home page and click Create Database. Otherwise, skip to the next step.

    In the Create Database dialog, enter a Name for the database and select Use demo data. This example uses fslDemo as the database name. You can leave all other options in their default state.

  2. Click Create to create the database.

  3. In the Databases panel, select the demo database you created to view it in the database Explorer page.

  4. On the Explorer page, expand Collections for the fslDemo database and click the Product collection.

  5. Click the Schema tab to view the schema for that collection:

    dashboard collection schema

    The collection include a unique constraint and several index definitions.

  6. To view a function schema, expand Functions and select inventory:

    start 07

    The schema includes the function name, inventory, function parameter, and the full function body.

    Functions can also include an annotation, @role, which is a way to assign a role to a function using FSL notation. In this example, the inventory function runs with the server role.

Next step

Learn more about working with schema by trying the exercises in the FQL language and API DevOps tutorials.

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!