You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
2.3 KiB
Plaintext

11 months ago
# Create Space
CREATE SPACE `kbqa` (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(64)) comment = '深圳人社知识图谱';
USE `kbqa`;
# Create Tag:
CREATE TAG `accept_scope` ( `detail` string NOT NULL) ttl_duration = 0, ttl_col = "", comment = "受理范围";
CREATE TAG `checklist` ( `detail` string NOT NULL) ttl_duration = 0, ttl_col = "", comment = "材料清单";
CREATE TAG `condition` ( `condition` string NOT NULL, `entity_type` string NOT NULL) ttl_duration = 0, ttl_col = "", comment = "条件(condition 判断条件entityType实体类型数据库配置)";
CREATE TAG `handler_channel` ( `detail` string NOT NULL) ttl_duration = 0, ttl_col = "", comment = "办理途径";
CREATE TAG `handler_place` ( `detail` string NOT NULL) ttl_duration = 0, ttl_col = "", comment = "办理窗口";
CREATE TAG `handler_process` ( `detail` string NOT NULL) ttl_duration = 0, ttl_col = "", comment = "办理流程";
CREATE TAG `item_branch` ( `item_name` string NOT NULL) ttl_duration = 0, ttl_col = "", comment = "事项名称(子节点)";
CREATE TAG `item_leaf` ( `item_name` string NOT NULL) ttl_duration = 0, ttl_col = "", comment = "事项名称(叶子结点)";
CREATE TAG `process_condition` ( `detail` string NOT NULL) ttl_duration = 0, ttl_col = "", comment = "办理条件";
# Create Edge:
CREATE EDGE `accept_scope_edge` () ttl_duration = 0, ttl_col = "", comment = "受理范围";
CREATE EDGE `checklist_edge` () ttl_duration = 0, ttl_col = "", comment = "办理清单";
CREATE EDGE `condition_edge` () ttl_duration = 0, ttl_col = "", comment = "条件";
CREATE EDGE `dependence_edge` () ttl_duration = 0, ttl_col = "", comment = "从属(两个子节点之间/子节点和叶子节点)";
CREATE EDGE `handler_channel_edge` () ttl_duration = 0, ttl_col = "", comment = "办理途径";
CREATE EDGE `handler_place_edge` () ttl_duration = 0, ttl_col = "", comment = "办理窗口";
CREATE EDGE `handler_process_edge` () ttl_duration = 0, ttl_col = "", comment = "办理流程";
CREATE EDGE `process_condition_edge` () ttl_duration = 0, ttl_col = "", comment = "办理条件";
:sleep 20;
# Create Index:
CREATE TAG INDEX `item_branch_item_name_index` ON `item_branch` ( `item_name`(100));
CREATE TAG INDEX `item_leaf_item_name_index` ON `item_leaf` ( `item_name`(100));