key 是数据库的物理结构,它包含两层意义和作用,

一是约束(偏重于约束和规范数据库的结构完整性),

二是索引(辅助查询用的)。

 

https://www.cnblogs.com/zjfjava/p/6922494.html

 

CREATE TABLE `act_ru_execution` (
`ID_` varchar(64) COLLATE utf8_bin NOT NULL,
`REV_` int(11) DEFAULT NULL,
`PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`BUSINESS_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`PARENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`SUPER_EXEC_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`ROOT_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`IS_ACTIVE_` tinyint(4) DEFAULT NULL,
`IS_CONCURRENT_` tinyint(4) DEFAULT NULL,
`IS_SCOPE_` tinyint(4) DEFAULT NULL,
`IS_EVENT_SCOPE_` tinyint(4) DEFAULT NULL,
`IS_MI_ROOT_` tinyint(4) DEFAULT NULL,
`SUSPENSION_STATE_` int(11) DEFAULT NULL,
`CACHED_ENT_STATE_` int(11) DEFAULT NULL,
`TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
`NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`START_TIME_` datetime(3) DEFAULT NULL,
`START_USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
`IS_COUNT_ENABLED_` tinyint(4) DEFAULT NULL,
`EVT_SUBSCR_COUNT_` int(11) DEFAULT NULL,
`TASK_COUNT_` int(11) DEFAULT NULL,
`JOB_COUNT_` int(11) DEFAULT NULL,
`TIMER_JOB_COUNT_` int(11) DEFAULT NULL,
`SUSP_JOB_COUNT_` int(11) DEFAULT NULL,
`DEADLETTER_JOB_COUNT_` int(11) DEFAULT NULL,
`VAR_COUNT_` int(11) DEFAULT NULL,
`ID_LINK_COUNT_` int(11) DEFAULT NULL,
PRIMARY KEY (`ID_`),
KEY `ACT_IDX_EXEC_BUSKEY` (`BUSINESS_KEY_`),
KEY `ACT_IDC_EXEC_ROOT` (`ROOT_PROC_INST_ID_`),
KEY `ACT_FK_EXE_PROCINST` (`PROC_INST_ID_`),
KEY `ACT_FK_EXE_PARENT` (`PARENT_ID_`),
KEY `ACT_FK_EXE_SUPER` (`SUPER_EXEC_`),
KEY `ACT_FK_EXE_PROCDEF` (`PROC_DEF_ID_`),
CONSTRAINT `ACT_FK_EXE_PARENT` FOREIGN KEY (`PARENT_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE,
CONSTRAINT `ACT_FK_EXE_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
CONSTRAINT `ACT_FK_EXE_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `ACT_FK_EXE_SUPER` FOREIGN KEY (`SUPER_EXEC_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin