forked from vesoft-inc/nebula-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added schema management (english) (vesoft-inc#159)
* added manage schema (english) * updated toc.md
- Loading branch information
1 parent
31ec378
commit 4c4d051
Showing
11 changed files
with
318 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Operate edge types | ||
|
||
After a graph space is created in a Nebula Graph database, you can create edge types. With Studio, you can choose to use **Console** or **Schema** to create, retrieve, update, or delete edge types. This article only introduces how to use **Schema** to operate edge types in a Nebula Graph database. | ||
|
||
## Prerequisites | ||
|
||
To operate an edge type on Studio, you must do a check of these: | ||
|
||
- Studio is connected to a Nebula Graph database. | ||
- A graph space is created. | ||
- Your account has the authority of GOD, ADMIN, or DBA. | ||
|
||
## Create an edge type | ||
|
||
To create an edge type on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
|
||
2. In the **Graph Space List** page, find a graph space and then click its name or click the ![Icon of setting](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-018.png "Set") icon in the **Operations** column. | ||
|
||
3. In the **Current Graph Space** field, confirm the name of the graph space. If necessary, you can choose another name to change the graph space. | ||
|
||
4. Click the **Edge Type** tab and click the **+ Create** button. | ||
|
||
5. On the **Create** page, do these settings: | ||
|
||
a. **Name**: Specify an appropriate name for the edge type. In this example, `action` is used. | ||
|
||
b. (Optional) If necessary, in the upper left corner of the **Define Properties** panel, click the check box to expand the panel and do these settings: | ||
|
||
- To define a property: Enter a property name, a data type, and a default value. | ||
|
||
- To add multiple properties: Click the **Add Property** button and define more properties. | ||
|
||
- To cancel a defined property: Besides the **Defaults** column, click the ![Icon of deletion](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-020.png "Cancel") icon. | ||
|
||
c. (Optional) If no index is set for the edge type, you can set the TTL configuration: In the upper left corner of the **Set TTL** panel, click the check box to expand the panel, and configure `TTL_COL` and `TTL_ DURATION`. For more information about both parameters, see [TTL configuration](https://docs.nebula-graph.com.cn/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/TTL/> "Click to go to Nebula Graph website"). | ||
|
||
6. When the preceding settings are completed, in the **Equivalent to the following nGQL statement** panel, you can see the nGQL statement equivalent to these settings. | ||
|
||
![Define properties of the `action` edge type](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-027.png "Define an edge type") | ||
|
||
7. Confirm the settings and then click the **+ Create** button. | ||
|
||
When the edge type is created successfully, the **Define Properties** panel shows all its properties on the list. | ||
|
||
## Edit an edge type | ||
|
||
To edit an edge type on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
|
||
2. In the **Graph Space List** page, find a graph space and then click its name or click the ![Icon of setting](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-018.png "Set") icon in the **Operations** column. | ||
|
||
3. In the **Current Graph Space** field, confirm the name of the graph space. If necessary, you can choose another name to change the graph space. | ||
|
||
4. Click the **Edge Type** tab, find an edge type and then click the ![Icon of edit](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-021.png "Edit") icon in the **Operations** column. | ||
|
||
5. On the **Edit** page, do these operations: | ||
|
||
- To edit a property: On the **Define Properties** panel, find a property, click **Edit**, and then change the data type or the default value. | ||
|
||
- To delete a property: On the **Define Properties** panel, find a property, click **Delete**. | ||
|
||
- To add more properties: On the **Define Properties** panel, click the **Add Property** button to add a new property. | ||
|
||
- To set the TTL configuration: In the upper left corner of the **Set TTL** panel, click the check box and then set TTL. | ||
|
||
- To edit the TTL configuration: On the **Set TTL** panel, click **Edit** and then change the configuration of `TTL_COL` and `TTL_DURATION`. | ||
|
||
- To delete the TTL configuration: When the **Set TTL** panel is expanded, in the upper left corner of the panel, click the check box to delete the configuration. | ||
|
||
6. When the configuration is done, in the **Equivalent to the following nGQL statement** panel, you can see the equivalent `ALTER EDGE` statement. | ||
|
||
## Delete an edge type | ||
|
||
To delete an edge type on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
|
||
2. In **Graph Space List**, find a graph space and then click its name or click the ![Icon of setting](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-018.png "Set") icon in the **Operations** column. | ||
|
||
3. In the **Current Graph Space** field, confirm the name of the graph space. If necessary, you can choose another name to change the graph space. | ||
|
||
4. Click the **Edge Type** tab, find an edge type and then click the ![Icon of deletion](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-017.png "Delete") icon in the **Operations** column. | ||
|
||
## Next to do | ||
|
||
After the edge type is created, you can use **Console** to insert edge data one by one manually or use **Import** to bulk import edge data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Operate Indexes | ||
|
||
You can create an index for a tag and/or an edge type. An index lets traversal start from vertices or edges with the same property and it can make a data query more efficient. You can create two index types: Tag Index and Edge Type Index. You can use **Console** or **Schema** to create, retrieve, and delete indexes. This article only introduces how to use **Schema** to operate an index. | ||
|
||
> **NOTE**: You can create an index when a tag or an edge type is created. But an index can decrease the write speed during data import. We recommend that you import data firstly and then create and rebuild an index. For more information, see [nGQL Manual](https://docs.nebula-graph.io/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/ "Click to go to the Nebula Graph website"). | ||
## Prerequisites | ||
|
||
To operate an index on Studio, you must do a check of these: | ||
|
||
- Studio is connected to a Nebula Graph database. | ||
- A graph space, tags, and edge types are created. | ||
- Your account has the authority of GOD, ADMIN, or DBA. | ||
|
||
## Create an index | ||
|
||
To create an index on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
2. On the **Graph Space List** page, find a graph space, and then click its name or the ![Icon of setting](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-018.png "Set") icon in the **Operations** column. | ||
3. In the **Current Graph Space** field, confirm the name of the graph space. If necessary, you can choose another name to change the graph space. | ||
4. Click the **Index** tab and then click the **+ Create** button. | ||
5. On the **Create** page, do these settings: | ||
|
||
a. **Index Type**: Choose to create an index for a tag or for an edge type. In this example, **Edge Type** is chosen. | ||
|
||
b. **Name**: Choose a tag name or an edge type name. In this example, **action** is chosen. | ||
|
||
c. **Index Name**: Specify a name for the new index. In this example, **action_index** is used. | ||
|
||
d. **Indexed Properties**: Click **Add**, and then, in the dialog box, choose a property. If necessary, repeat this step to choose more properties. You can drag the properties to sort them. In this example, `actionId` and `label` are chosen. | ||
> **NOTE**: The order of the indexed properties has an effect on the result of the `LOOKUP` statement. For more information, see [nGQL Manual](https://docs.nebula-graph.io/manual-EN/2.query-language/4.statement-syntax/2.data-query-and-manipulation-statements/lookup-syntax/#error_code_411 "Click to go to the Nebula Graph website"). | ||
6. When the settings are done, the **Equivalent to the following nGQL statement** panel shows the statement equivalent to the settings. | ||
![A page for index creation](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-030.png "Create an index") | ||
|
||
7. Confirm the settings and then click the **+ Create** button. | ||
When an index is created, the index list shows the new index. | ||
|
||
## View indexes | ||
|
||
To view indexes on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
2. In the graph space list, find a graph space, and then click its name or the ![Icon of setting](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-018.png "Set") icon in the **Operations** column. | ||
3. In the **Current Graph Space** field, confirm the name of the graph space. If necessary, you can choose another name to change the graph space. | ||
4. Click the **Index** tab, in the upper left corner, choose an index type, **Tag** or **Edge Type**. | ||
5. In the list, find an index and click its row. All its details are shown in the expanded row. | ||
|
||
## Delete an index | ||
|
||
To delete an index on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
2. In the graph space list, find a graph space, and then click its name or the ![Icon of setting](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-018.png "Set") icon in the **Operations** column. | ||
3. In the **Current Graph Space** field, confirm the name of the graph space. If necessary, you can choose another name to change the graph space. | ||
4. Click the **Index** tab, find an index and then the ![Icon of deletion](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-017.png "Delete") icon in the **Operations** column. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Operate graph spaces | ||
|
||
When Studio is connected to Nebula Graph, you can create or delete a graph space. You can use **Console** or **Schema** to do these operations. This article only introduces how to use **Schema** to operate graph spaces in a Nebula Graph database. | ||
|
||
## Prerequisites | ||
|
||
To operate a graph space on Studio, you must do a check of these: | ||
|
||
- Studio is connected to a Nebula Graph database. | ||
- Your account has the authority of GOD. It means that: | ||
- If the authentication is enabled in Nebula Graph, you can use `user` and `password` to sign in to Studio. | ||
- If the authentication is disabled in Nebula Graph, you must use `root` and its password to sign in to Studio. | ||
|
||
## Create a graph space | ||
|
||
To create a graph space on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
2. On the **Graph Space List** page, click the **+ Create** button. | ||
3. On the **Create** page, do these settings: | ||
|
||
a. **Name**: Specify a name to the new graph space. In this example, `mooc_actions` is used. The name must be distinct in the database. | ||
|
||
b. **Optional Parameters**: Set `partition_num`, `replica_factor`, `charset`, or `collate`. In this example, these parameters are set to `10`, `1`, `utf8`, and `utf8_bin` separately. For more information, see [`CREATE SPACE` syntax](https://docs.nebula-graph.io/manual-EN/2.query-language/4.statement-syntax/1.data-definition-statements/create-space-syntax/ "Click to go to the Nebula Graph website"). | ||
|
||
In the **Equivalent to the following nGQL statement** panel, you can see the statement equivalent to the preceding settings. | ||
|
||
4. Confirm the settings and then click the **+ Create** button. If the graph space is created successfully, you can see it on the graph space list. | ||
|
||
![The Create page with settings for a graph space](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-026.png "Create a graph space") | ||
|
||
## Delete a graph space | ||
|
||
To delete a graph space on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
2. In the graph space list, find a graph space and then the ![Icon of deletion](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-017.png "Delete") icon in the **Operations** column. | ||
|
||
![Graph space list with the graph space to be deleted](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-029.png "Delete a graph space") | ||
3. On the dialog box, confirm the information and then click the **OK** button. | ||
When the graph space is deleted successfully, it is removed from the graph space list. | ||
|
||
## Next to do | ||
|
||
After a graph space is created, you can create or edit a schema, including: | ||
|
||
- [Operate tags](st-ug-crud-tag.md) | ||
- [Operate edge types](st-ug-crud-edge-type.md) | ||
- [Operate indexes](st-ug-crud-index.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Operate tags | ||
|
||
After a graph space is created in a Nebula Graph database, you can create tags. With Studio, you can use **Console** or **Schema** to create, retrieve, update, or delete tags. This article only introduces how to use **Schema** to operate tags in a Nebula Graph database. | ||
|
||
## Prerequisites | ||
|
||
To operate a tag on Studio, you must do a check of these: | ||
|
||
- Studio is connected to a Nebula Graph database. | ||
- A graph space is created. | ||
- Your account has the authority of GOD, ADMIN, or DBA. | ||
|
||
## Create a tag | ||
|
||
To create a tag on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
|
||
2. In the **Graph Space List** page, find a graph space, and then click its name or the ![Icon of setting](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-018.png "Settings") icon in the **Operations** column. | ||
|
||
3. In the **Current Graph Space** field, confirm the name of the graph space. If necessary, you can choose another name to change the graph space. | ||
|
||
4. Click the **Tag** tab and click the **+ Create** button. | ||
|
||
5. On the **Create** page, do these settings: | ||
|
||
a. **Name**: Specify an appropriate name for the tag. In this example, `course` is specified. | ||
|
||
b. (Optional) If necessary, in the upper left corner of the **Define Properties** panel, click the check box to expand the panel and do these settings: | ||
|
||
- To define a property: Enter a property name, a data type, and a default value. | ||
|
||
- To add multiple properties: Click the **Add Property** button and define more properties. | ||
|
||
- To cancel a defined property: Besides the **Defaults** column, click the ![Icon of deletion](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-020.png "Cancel") icon. | ||
|
||
c. (Optional) If no index is set for the tag, you can set the TTL configuration: In the upper left corner of the **Set TTL** panel, click the check box to expand the panel and configure `TTL_COL` and `TTL_ DURATION`. For more information about both parameters, see [TTL configuration](https://docs.nebula-graph.com.cn/manual-CN/2.query-language/4.statement-syntax/1.data-definition-statements/TTL/> "Click to go to Nebula Graph website"). | ||
|
||
6. When the preceding settings are completed, in the **Equivalent to the following nGQL statement** panel, you can see the nGQL statement equivalent to these settings. | ||
|
||
![Define properties of the `course` tag](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-028.png "Define a tag") | ||
|
||
7. Confirm the settings and then click the **+ Create** button. | ||
|
||
When the tag is created successfully, the **Define Properties** panel shows all its properties on the list. | ||
|
||
## Edit a tag | ||
|
||
To edit a tag on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
|
||
2. In the **Graph Space List** page, find a graph space, and then click its name or the ![Icon of setting](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-018.png "Set") icon in the **Operations** column. | ||
|
||
3. In **Current Graph Space** field, confirm the name of the graph space. If necessary, you can choose another name to change the graph space. | ||
|
||
4. Click the **Tag** tab, find a tag and then the ![Icon of edit](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-021.png "Edit") icon in the **Operations** column. | ||
|
||
5. On the **Edit** page, do these settings: | ||
|
||
- To edit a property: On the **Define Properties** panel, find a property, click **Edit**, and then change the data type or the default value. | ||
|
||
- To delete a property: On the **Define Properties** panel, find a property and then click **Delete**. | ||
|
||
- To add more properties: On the **Define Properties** panel, click the **Add Property** button to add a new property. | ||
|
||
- To set the TTL configuration: In the upper left corner of the **Set TTL** panel, click the check box and then set the TTL configuration. | ||
|
||
- To edit the TTL configuration: On the **Set TTL** panel, click **Edit** and then change the configuration of `TTL_COL` and `TTL_DURATION`. | ||
|
||
- To delete the TTL configuration: When the **Set TTL** panel is expanded, in the upper left corner of the panel, click the check box to delete the configuration. | ||
|
||
6. When the configuration is done, in the **Equivalent to the following nGQL statement** panel, you can see the equivalent `ALTER TAG` statement. | ||
|
||
## Delete a tag | ||
|
||
To delete a tag on **Schema**, follow these steps: | ||
|
||
1. In the toolbar, click the **Schema** tab. | ||
|
||
2. In **Graph Space List**, find a graph space, and then click its name or the ![Icon of setting](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-018.png "Settings") icon in the **Operations** column. | ||
|
||
3. In the **Current Graph Space** field, confirm the name of the graph space. If necessary, you can choose another name to change the graph space. | ||
|
||
4. Click the **Tag** tab, find a tag and then the ![Icon of deletion](https://docs-cdn.nebula-graph.com.cn/nebula-studio-docs/st-ug-017.png) icon in the **Operations** column. | ||
|
||
## Next to do | ||
|
||
After the tag is created, you can use **Console** to insert vertex data one by one manually or use **Import** to bulk import vertex data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Nebula Graph® Studio User Guide | ||
|
||
- About Nebula Graph® Studio | ||
- [What is Nebula Graph® Studio](../nebula-graph-studio-user-guide-en.md) | ||
- [Glossary] [TODO] | ||
- [Limitations] [TODO] | ||
- [Updates] [TODO] | ||
- [FAQ] [TODO] | ||
- Insall and connect | ||
- [Install Studio](../nebula-graph-studio-user-guide-en.md) | ||
- [Connect to Nebula Graph](../nebula-graph-studio-user-guide-en.md) | ||
- [Clear connection] [TODO] | ||
- Quick start | ||
- [Design a schema] [TODO] | ||
- [Prepare CSV files] [TODO] | ||
- [Create a schema](../nebula-graph-studio-user-guide-en.md) | ||
- [Import data](../nebula-graph-studio-user-guide-en.md) | ||
- [Query data] [TODO] | ||
- Operation guide | ||
- Use Schema | ||
- [Operate graph spaces](manage-schema/st-ug-crud-space.md) | ||
- [Operate tags](manage-schema/st-ug-crud-tag.md) | ||
- [Operate edge types](manage-schema/st-ug-crud-edge-type.md) | ||
- [Operate indexes](manage-schema/st-ug-crud-index.md) | ||
- [Use Explore] [TODO] | ||
- [Use Console] [TODO] | ||
- Best practices [TODO] | ||
- Troubleshooting [TODO] | ||
- Connection | ||
- Error messages |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.