Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update st-ug-create-schema.md #1331

Merged
merged 1 commit into from
Dec 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs-2.0/nebula-studio/quick-start/st-ug-create-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,29 @@
3. 在命令行中,依次输入以下语句,并点击 ![表示运行的图标](../figs/st-ug-008.png "Run 图标") 图标。

```nGQL
-- 创建 Tag player,带有 2 个属性
// 创建 Tag player,带有 2 个属性
CREATE TAG player(name string, age int);

-- 创建 Tag team,带有 1 个属性
// 创建 Tag team,带有 1 个属性
CREATE TAG team(name string);

-- 创建 Edge type follow,带有 1 个属性
// 创建 Edge type follow,带有 1 个属性
CREATE EDGE follow(degree int);

-- 创建 Edge type serve,带有 2 个属性
// 创建 Edge type serve,带有 2 个属性
CREATE EDGE serve(start_year int, end_year int);
```

至此,用户已经完成了 Schema 创建。用户可以运行以下语句查看 Tag 与 Edge type 的定义是否正确、完整。

```nGQL
-- 列出当前图空间中所有 Tag
// 列出当前图空间中所有 Tag
SHOW TAGS;

-- 列出当前图空间中所有 Edge type
// 列出当前图空间中所有 Edge type
SHOW EDGES;

-- 查看每种 Tag 和 Edge type 的结构是否正确
// 查看每种 Tag 和 Edge type 的结构是否正确
DESCRIBE TAG player;
DESCRIBE TAG team;
DESCRIBE EDGE follow;
Expand Down