Skip to content

Design a schema

To manipulate graph data in Nebula Graph with Studio, you must have a graph schema. This article introduces how to design a graph schema for Nebula Graph.

A graph schema for Nebula Graph must have these essential elements:

  • Tags (namely vertex types) and their properties.
  • Edge types and their properties.

In this article, you can install the sample data set basketballplayer and use it to explore a pre-designed schema.

This table gives all the essential elements of the schema.

Element Name Property name (Data type) Description
Tag player - namestring
- ageint
Represents the player.
Tag team - namestring Represents the team.
Edge type serve - start_yearint
- end_yearint
Represent the players behavior.
This behavior connects the player to the team, and the direction is from player to team.
Edge type follow - degreeint Represent the players behavior.
This behavior connects the player to the player, and the direction is from a player to a player.

This figure shows the relationship (action) between a user and a course on the MOOC platform.

Users take actions on a MOOC platform


Last update: June 9, 2021
Back to top