분류별 보고표
카테고리와 관련된 테이블의 ` Postgres `, ` Db2 `, ` Oracle ` 문장을 확인해 보세요.
| 주제 영역 | 테이블 이름 | 설명 |
|---|---|---|
| 카테고리 | categories | 정의된 거버넌스 범주. |
| 카테고리 | category_collaborators | 특정 카테고리의 모든 기여자 목록. |
| 카테고리 | category_tags | 해당 카테고리와 연결된 태그들. |
| 카테고리 | category_associations | 범주 간의 관계. |
카테고리 테이블
이 표에는 정의된 거버넌스 범주에 대한 정보가 포함되어 있습니다.
이 표에는 다음과 같은 열이 있습니다:
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) )
Oracle
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(6) NOT NULL,
modified_by varchar(128),
modified_on timestamp(6),
tech_start TIMESTAMP(6) DEFAULT SYSTIMESTAMP NOT NULL,
tech_end TIMESTAMP(6) DEFAULT to_timestamp('9999-12-30', 'YYYY-MM-DD') NOT NULL,
ts_id TIMESTAMP(6) DEFAULT SYSTIMESTAMP NOT NULL,
PRIMARY KEY(category_id))
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
Oracle
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(6) DEFAULT SYSTIMESTAMP NOT NULL,
tech_end TIMESTAMP(6) DEFAULT to_timestamp('9999-12-30', 'YYYY-MM-DD') NOT NULL,
ts_id TIMESTAMP(6) DEFAULT SYSTIMESTAMP NOT NULL,
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
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
Oracle
CREATE TABLE문:
CREATE TABLE category_tags(tag_name varchar(256) NOT NULL,
category_id varchar(128) NOT NULL,
tech_start TIMESTAMP(6) DEFAULT SYSTIMESTAMP NOT NULL,
tech_end TIMESTAMP(6) DEFAULT to_timestamp('9999-12-30', 'YYYY-MM-DD') NOT NULL,
ts_id TIMESTAMP(6) DEFAULT SYSTIMESTAMP NOT NULL,
PRIMARY KEY(tag_name,
category_id))
ALTER TABLE 문:
ALTER TABLE category_tags ADD CONSTRAINT fk_category_tags_categories_25 FOREIGN KEY (category_id) REFERENCES categories(category_id) ON
DELETE
CASCADE
category_associations 테이블
이 테이블에는 카테고리 간의 관계에 대한 정보가 있습니다.
이 표에는 다음과 같은 열이 있습니다:
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
Oracle
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) DEFAULT SYSTIMESTAMP NOT NULL,
tech_end TIMESTAMP(6) DEFAULT to_timestamp('9999-12-30', 'YYYY-MM-DD') NOT NULL,
ts_id TIMESTAMP(6) DEFAULT SYSTIMESTAMP NOT NULL,
PRIMARY KEY(end1_category_id,
end2_category_id,
relationship_type))
ALTER TABLE 문:
ALTER TABLE category_associations ADD CONSTRAINT fk_category_associations_categories_16 FOREIGN KEY (end1_category_id) REFERENCES categories(category_id) ON
DELETE
CASCADE
ALTER TABLE category_associations ADD CONSTRAINT fk_category_associations_categories_17 FOREIGN KEY (end2_category_id) REFERENCES categories(category_id) ON
DELETE
CASCADE
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