Optional advanced tool for complex data modeling. For simple table creation, use relational-database-tool directly with SQL statements.
If this environment only installed the current skill, start from the CloudBase main entry and use the published cloudbase/references/... paths for sibling skills.
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.mdhttps://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/data-model-creation/SKILL.mdKeep local references/... paths for files that ship with the current skill directory. When this file points to a sibling skill such as auth-tool or web-development, use the standalone fallback URL shown next to that reference.
classDiagram../relational-database-tool/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/relational-database-tool/SKILL.md)../spec-workflow/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/spec-workflow/SKILL.md)CREATE TABLE, ALTER TABLE, or CRUD tasks.This skill is an advanced modeling path, not the default path for database work.
relational-database-tool and write SQL directly.relational-database-tool instead whenCREATE TABLE, ALTER TABLE, INSERT, UPDATE, DELETE, or SELECTclassDiagram outputClarify the entity set
Model first, then generate
classDiagram content.Use the right tools
manageDataModel(action="list"|"get"|"docs")modifyDataModel (compatibility name; create-only)Publish carefully
| Business meaning | Mermaid type |
|---|---|
| text | string |
| number | number |
| boolean | boolean |
| enum | x-enum |
email | |
| phone | phone |
| URL | url |
| image | x-image |
| file | x-file |
| rich text | x-rtf |
| date | date |
| datetime | datetime |
| region | x-area-code |
| location | x-location |
| array | string[] or another explicit array type |
required() only for fields the user explicitly marks as required.unique() only for explicit uniqueness needs.display_field() for the human-facing label field.<<description>> notes to important fields.classDiagram
class User {
username: string <<Username>>
email: email <<Email>>
display_field() "username"
required() ["username", "email"]
unique() ["username", "email"]
}
class Order {
orderNo: string <<Order Number>>
totalAmount: number <<Total Amount>>
userId: string <<User ID>>
display_field() "orderNo"
unique() ["orderNo"]
}
Order "n" --> "1" User : userId
%% Class naming
note for User "用户"
note for Order "订单"
Use this before creating related models, checking naming consistency, or assessing how an existing model is defined:
manageDataModel(action="list")manageDataModel(action="get", name="ModelName")manageDataModel(action="docs", name="ModelName")Use modifyDataModel with:
mermaidDiagramaction="create" when you want to create new modelsrelational-database-tool when needed.