Skip to content

Create a schema

Explorer allows you to create a schema by using GUI.

Note

  • Users can use the Schema drafting function to design schema visually. For more information, see Schema drafting.
  • Users can directly execute nGQL commands on the console to manage the schema.

Prerequisites

  • Your account has the privilege of GOD, ADMIN, or DBA. For more information, see Roles and privileges .
  • The schema is designed.

Note

If no graph space exists and your account has the GOD privilege, you can create a graph space on the Console page.

Entry

At the top navigation bar, click schema.

Create graph space

  1. Click Create Space.
  2. Set parameters. For descriptions of the parameters, see CREATE SPACE.
  3. Click Create.

Create Tag or Edge type

  1. In the Graph Space List page, find a graph space and then click its name or click Schema in the Operations column.
  2. Click the Tag or Edge Type tab and click the Create button.
  3. Set parameters. For descriptions of the parameters, see CREATE TAG or CREATE EDGE.

    Note

    If no index is set for the tag, you can set the TTL configuration. For more information, see TTL configuration.

  4. Click Create.

In the Tag and Edge Type lists, you can perform modification and deletion operations.

Create index

Note

  • Before creating an index, ensure that the associated Tag or Edge type has been created.
  • The index can decrease the write speed during data import. We recommend that you import data first and then create and rebuild an index. For more information, see Index overview.
  1. In the Graph Space List page, find a graph space and then click its name or click Schema in the Operations column.
  2. Click the Index tab and click the Create button.
  3. Set parameters. For descriptions of the parameters, see CREATE INDEX.

    Note

    The order of the indexed properties has an effect on the result of the LOOKUP statement. For more information, see LOOKUP.

  4. Click Create.

In the Index list, you can rebuild or delete the index.

View statistics

  1. In the Graph Space List page, find a graph space and then click its name or click Schema in the Operations column.
  2. Click Statistics tab and click the Refresh button.

View schema

  1. In the Graph Space List page, find a graph space and then click its name or click Schema in the Operations column.
  2. Click View Schema tab and click the Refresh button.

Last update: February 19, 2024