0 / 0
資料の 英語版 に戻る
カテゴリー・レポート・テーブル
最終更新: 2024年12月13日
カテゴリー・レポート・テーブル

カテゴリーに関連する表の Postgres、 Db2 ステートメントを確認します。

サブジェクト・エリア 表名 説明
カテゴリー カテゴリー 定義されているガバナンス・カテゴリー。
カテゴリー category_collaborators カテゴリーのすべてのコラボレーターのリスト。
カテゴリー category_tags カテゴリーに関連付けられているタグ。
カテゴリー category_associations カテゴリー間の関係。

カテゴリー・テーブル

この表には、定義されているガバナンス・カテゴリーに関する情報が含まれます。

この表には、以下の列があります。

  • category_id -カテゴリーの ID です。
  • name -カテゴリーの名前です。
  • description -カテゴリーの説明です。
  • created_by -このカテゴリーを作成したユーザーの ID。
  • created_on -カテゴリーが作成されたときのタイム・スタンプ。
  • modified_by -このカテゴリーを最後に変更したユーザーの ID。
  • 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 -カテゴリーの ID です。
  • user_id -ユーザーの 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 -カテゴリーの 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_associations テーブル

この表には、カテゴリー間の関係に関する情報が含まれます。

この表には、以下の列があります。

  • end1_category_id -ソース・カテゴリーの ID。
  • end2_category_id -ターゲット・カテゴリーの ID。
  • relationship_type -2 つのカテゴリー間の関係タイプ (例: 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

もっと見る

親トピック: レポート・テーブル