Tablas de informes por categorías

Consulte las sentencias « Postgres », « Db2 » y « Oracle » de las tablas relacionadas con las categorías.

Área temática Nombre de tabla Descripción
Categorías categories Las categorías de gobernanza que se han definido.
Categorías category_collaborators Una lista de todos los colaboradores de una categoría.
Categorías category_tags Las etiquetas asociadas a una categoría.
Categorías category_associations Las relaciones entre las categorías.

Tabla de categorías

Esta tabla contiene información sobre las categorías de gobernanza definidas.

Esta tabla tiene las siguientes columnas:

  • category_id - El identificador de la categoría.
  • name - El nombre de la categoría.
  • description - La descripción de la categoría.
  • created_by - El identificador del usuario que creó la categoría.
  • created_on - La fecha y hora en que se creó la categoría.
  • modified_by - El identificador del usuario que modificó la categoría por última vez.
  • modified_on - La fecha y hora de la última modificación de la categoría.

Postgres

Sentencia 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

Sentencia 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

Sentencia 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))

tabla «category_collaborators»

Esta tabla contiene una lista de todos los colaboradores de una categoría.

Esta tabla tiene las siguientes columnas:

  • category_id - El identificador de la categoría.
  • user_id - El identificador del usuario.
  • role - Los roles asignados a este usuario o grupo de usuarios, por ejemplo, Propietario, Administrador, Editor, Revisor o Lector.

Postgres

Sentencia 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))

Sentencia 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

Sentencia 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

Sentencia 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))

Sentencia ALTER TABLE:

ALTER TABLE category_collaborators ADD CONSTRAINT fk_category_collaborators_categories_20 FOREIGN KEY (category_id) REFERENCES categories(category_id) ON
	DELETE
	CASCADE

tabla «category_tags»

Esta tabla contiene información sobre las etiquetas asociadas con una categoría.

Esta tabla tiene las siguientes columnas:

  • tag_name - El nombre de la etiqueta asociada.
  • category_id - El identificador de la categoría.

Postgres

Sentencia 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));

Sentencias 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

Sentencia 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) )

Sentencias 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

Sentencia 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))

Sentencia ALTER TABLE:

ALTER TABLE category_tags ADD CONSTRAINT fk_category_tags_categories_25 FOREIGN KEY (category_id) REFERENCES categories(category_id) ON
	DELETE
	CASCADE

tabla «category_associations»

Esta tabla contiene información sobre las relaciones entre categorías.

Esta tabla tiene las siguientes columnas:

  • end1_category_id - El identificador de la categoría de origen.
  • end2_category_id - El identificador de la categoría de destino.
  • relationship_type - El tipo de relación entre las dos categorías, por ejemplo, «categoría principal».

Postgres

Sentencia 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))

Sentencia 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

Sentencia 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 

Sentencia 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

Sentencia 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))

Sentencias 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

Más información