Registry operational database

🌐 This document is available in both English and Ukrainian. Use the language toggle in the top right corner to switch between versions.

1. General description

The registry database contains both official service tables and all registry tables modeled by the regulation administrator.

Service tables are created in the public schema when the registry is created. Registry tables are created in the `registry' scheme when deploying the regulation.

This document deals with service tables.

2. Database schema

registry-public-schema
Legend
Diagram notation Table notation Meaning

ο and [PK]

(PK)

Primary key

[FK]

(references table.column)

Foreign key

column name in bold

Required field (not null)

column name in regular font

Optional field (null)

3. Data structure

3.1. ddm_liquibase_metadata

The metadata is obtained from the data model of the regulation. Data API is built on their basis.

Currently, each type of data model change uses its own metadata recording format, so in most cases the contents of the columns do not correspond to their original purpose.

Column name
Description Row ID

change_type text
Type of change

change_name text
Name of change

attribute_name text
Attribute name

attribute_value text
Attribute value

created_at timestamp with time zone
Record creation time

Uniqueness constraint

change_name, change_type, attribute_name, attribute_value

3.2. ddm_rls_metadata

Configuring Row-Level Security Rules for Data API Requests

Column name
Description

rls_id integer (PK)
Row ID

name text
Name of rule

type text
Type of operation

  • read

  • write

jwt_attribute text
The name of the attribute of the jwt-token, in which the values by which the filtering takes place are transferred

check_column text
The name of the discriminator column on which the filtering takes place

check_table text
The name of the table or representation of the search criteria to which the rule applies

Uniqueness constraint

name, type

check_table, type

3.3. ddm_role_permission

Catalog of rights issued for the role. Used for role-based access control (RBAC) to registry data.

Column name
Description

permission_id integer (PK)
Row ID

role_name text
User role name

object_name text
The name of the table or search criteria for which the permission is granted

column_name text
The name of the column for which permission is granted

operation enum
The type of operation for which permission is granted

  • S - reading

  • I - creating

  • U - updating

  • D - deleting

created_at timestamp with time zone
Permission creation time

Uniqueness constraint

role_name,object_name,operation,column_name

3.4. ddm_source_application

Catalog of applications - data sources. Entries to the directory are added automatically when data is first sent to the registry from the application.

Column name
Description

application_id uuid (PK)
Row ID

application_name text
Application name

created_by text
The ID of the user at whose request the record was created

created_at timestamp with time zone
Record creation time

Uniqueness constraint

application_name

3.5. ddm_source_business_process

Catalog of business processes - data sources. Entries to the directory are added automatically when data is first sent to the registry from the business process.

Column name
Description

business_process_id uuid (PK)
Row ID

business_process_name text
Business process name

created_by text
The ID of the user at whose request the record was created

created_at timestamp with time zone
Record creation time

Uniqueness constraint

business_process_name

3.6. ddm_source_system

Catalog of systems - data sources. Entries in the catalog are added automatically when data is first received from the system to the registry.

Column name
Description

system_id uuid (PK)
Row ID

system_name text
System name

created_by text
The ID of the user at whose request the record was created

created_at timestamp with time zone
Record creation time

Uniqueness constraint

system_name