Go back to the English version of the documentation类别报告表
类别报告表
Last updated: 2024年12月13日
检查 Postgres Db2 语句以获取与类别相关的表。
主题区域 | 表名 | 描述 |
---|---|---|
类别 | 类别 | 定义的监管类别。 |
类别 | 类别合作者 | 类别的所有合作者的列表。 |
类别 | 类别标记 | 与类别关联的标记。 |
类别 | 类别关联 | 类别之间的关系。 |
类别表
此表包含有关已定义的监管类别的信息。
此表具有以下列:
category_id
-类别的标识。name
-类别的名称。description
-类别的描述。created_by
-创建类别的用户的标识。created_on
-创建类别时的时间戳记。modified_by
-上次修改类别的用户的标识。modified_on
-上次修改类别时的时间戳记。
Postgres
CREATE TABLE 语句:
create table categories(category_id varchar(128) not null,
name varchar(256) not null,
description text,
created_by varchar(128) not null,
created_on timestamp(6) not null,
modified_by varchar(128),
modified_on timestamp(6),
tech_start TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) not null default to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
primary key(category_id));
Db2
CREATE TABLE 语句:
create table categories(category_id varchar(128) not null,
name varchar(256) not null,
description clob,
created_by varchar(128) not null,
created_on timestamp(12) not null,
modified_by varchar(128),
modified_on timestamp(12),
tech_start TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row begin,
tech_end TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row
end,
ts_id TIMESTAMP(12) not null generated always as transaction start ID,
primary key(category_id),
period SYSTEM_TIME (tech_start,
tech_end) )
category_collaborators 表
此表包含类别的所有合作者的列表。
此表具有以下列:
category_id
-类别的标识。user_id
-用户的标识。role
-分配给此用户或用户组的角色,例如 "所有者" , "管理员" , "编辑者" , "复审者" 或 "查看者"。
Postgres
CREATE TABLE 语句:
create table category_collaborators(category_id varchar(128) not null,
user_id varchar(128) not null,
role varchar(128) not null,
user_type varchar(16) not null,
tech_start TIMESTAMP(12) not null default CURRENT_TIMESTAMP,
tech_end TIMESTAMP(12) not null default to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(12) not null default CURRENT_TIMESTAMP,
primary key(category_id,
user_id,
role))
ALTER TABLE 语句:
alter table category_collaborators add constraint fk_category_collaborators_categories_20 foreign key (category_id) references categories(category_id) on
delete
cascade on
update
no action
```</md-block>
</details>
<hr>
<hr id="5">
<details>
<summary>Db2</summary>
<md-block>
CREATE TABLE statement:
```sql {: .codeblock}
create table category_collaborators(category_id varchar(128) not null,
user_id varchar(128) not null,
role varchar(128) not null,
user_type varchar(16) not null,
tech_start TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row begin,
tech_end TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row
end,
ts_id TIMESTAMP(12) not null generated always as transaction start ID,
primary key(category_id,
user_id,
role),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table category_collaborators add constraint fk_category_collaborators_categories_20 foreign key (category_id) references categories(category_id) on
delete
cascade on
update
no action
category_tags 表
此表包含有关与类别关联的标记的信息。
此表具有以下列:
tag_name
-关联标记的名称。category_id
-类别的标识。
Postgres
CREATE TABLE 语句:
create table category_tags(tag_name varchar(256) not null,
category_id varchar(128) not null,
tech_start TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) not null default to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
primary key(tag_name,
category_id));
ALTER TABLE 语句:
alter table category_tags add constraint fk_category_tags_tags_27 foreign key (tag_name) references tags(tag_name) on
delete
cascade on
update
no action
alter table category_tags add constraint fk_category_tags_categories_25 foreign key (category_id) references categories(category_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table category_tags(tag_name varchar(256) not null,
category_id varchar(128) not null,
tech_start TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row begin,
tech_end TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row
end,
ts_id TIMESTAMP(12) not null generated always as transaction start ID,
primary key(tag_name,
category_id),
period SYSTEM_TIME (tech_start,
tech_end) )
ALTER TABLE 语句:
alter table category_tags add constraint fk_category_tags_tags_27 foreign key (tag_name) references tags(tag_name) on
delete
cascade on
update
no action
alter table category_tags add constraint fk_category_tags_categories_25 foreign key (category_id) references categories(category_id) on
delete
cascade on
update
no action
category_关联表
此表包含有关类别之间关系的信息。
此表具有以下列:
end1_category_id
-源类别的标识。end2_category_id
-目标类别的标识。relationship_type
-两个类别之间的关系类型,例如 parent_category。
Postgres
CREATE TABLE 语句:
create table category_associations(end1_category_id varchar(128) not null,
end2_category_id varchar(128) not null,
relationship_type varchar(256) not null,
cr_definition_id varchar(128),
reverse_relationship_type varchar(256),
tech_start TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
tech_end TIMESTAMP(6) not null default to_timestamp('9999-12-30', 'YYYY-MM-DD'),
ts_id TIMESTAMP(6) not null default CURRENT_TIMESTAMP,
primary key(end1_category_id,
end2_category_id,
relationship_type))
ALTER TABLE 语句:
alter table category_associations add constraint fk_category_associations_glossary_custom_relationship_def_7 foreign key (cr_definition_id) references glossary_custom_relationship_def(cr_definition_id) on
delete
cascade on
update
no action
Db2
CREATE TABLE 语句:
create table category_associations(end1_category_id varchar(128) not null,
end2_category_id varchar(128) not null,
relationship_type varchar(256) not null,
cr_definition_id varchar(128),
reverse_relationship_type varchar(256),
tech_start TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row begin,
tech_end TIMESTAMP(12) not null IMPLICITLY HIDDEN generated always as row
end,
ts_id TIMESTAMP(12) not null generated always as transaction start ID,
primary key(end1_category_id,
end2_category_id,
relationship_type),
period SYSTEM_TIME (tech_start,
tech_end) ) ORGANIZE by row
ALTER TABLE 语句:
alter table category_associations add constraint fk_category_associations_glossary_custom_relationship_def_7 foreign key (cr_definition_id) references glossary_custom_relationship_def(cr_definition_id) on
delete
cascade on
update
no action
了解更多信息
父主题: 报告表