Design a schema¶
To operate 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, the Social Network: MOOC User Action Dataset and 97 distinct course names are used to introduce how to design a schema.
This table gives all the essential elements of the schema.
|Element||Name||Property name (Data type)||Description|
||Represents users of the specified MOOC platform.|
||Represents the courses on the specified MOOC platform.|
|Represents actions taken by users on the specified MOOC platform. An action links a user and a course and the direction is from a user to a course. It has four features.|
This figure shows the relationship (action) between a user and a course on the MOOC platform.