Database Schema

The described database tables are used to manage the metadata of objects.

Table of Contents

Introduction

This article describes the structure of the individual tables in each database used by the core and gives an idea of how the versions of objects and the tables themselves are managed. The specification of the data type enables the appropriate handling of the data columns.

The individual databases have to be configured in the application-dbs.yml configuration file. The supported database providers are listed in the yuuvis® Momentum Requirements article.

General Description

Each database for yuuvis® Momentum core consists of the following five tables:

  • dmsobject
  • dmsobject_oldversions
  • auditentry
  • DATABASECHANGELOG
  • DATABASECHANGELOGLOCK

Please note that these five tables contain only metadata, but no content data.

'dmsobject' Table

This table contains the metadata for the current version of each object stored in yuuvis® Momentum. The data types apply to the database types postgresql and cockroachdb. Due to the use of JSON for some columns, the table structure can be kept slim. The table contains the following columns:


ColumnDescriptionData Type (max. length)
objectidCorresponds to the general object property system:objectId.uuid
versionnumberCorresponds to the general object property system:versionNumber.int
basetypeidCorresponds to the general object property system:baseTypeId.varchar(36)
objecttypeid

Corresponds to the general object property system:objectTypeId.

varchar(1024)
createdbyCorresponds to the general object property system:createdBy.varchar(256)
lastmodifiedbyCorresponds to the general object property system:lastModifiedBy.
varchar(256)
creationdateCorresponds to the general object property system:creationDate.timestamptz
lastmodificationdateCorresponds to the general object property system:lastModificationDate.timestamptz
propertiesStores all properties and their values that are assigned to the object based on its object type.
>> Schema - Defining Object Types
json
tenantCorresponds to the general object property system:tenant.varchar(256)
contextid
varchar(64)
renditionStores all properties and their values that describe available renditions for the object.
>> Renditions
json
cs_lengthCorresponds to the content stream property length.bigint
cs_mimetypeCorresponds to the content stream property mimeType.varchar(128)
cs_filenameCorresponds to the content stream property fileName.varchar(1024)
cs_digestCorresponds to the content stream property digest.varchar(64)
cs_contentstreamidCorresponds to the content stream property contentStreamId.varchar(1024)
cs_repositoryid

Corresponds to the content stream property repositoryId.

varchar(64)
acl
json
internaldata
int
cs_rangeCorresponds to the content stream property range.varchar(2048)
traceidCorresponds to the general object property system:traceId.varchar(64)
versionnumber

cs_archivepath

Corresponds to the content stream property archivePath.

varchar(2048)
tags

Corresponds to the general object property system:tags.
>> Tagging

json
deletedFlags the object to be invisible for users after a deletion request until the deletion process is completed.boolean

'dmsobject_oldversions' Table

This table contains the same columns as the dmsobject table, but WITHOUT the last two columns tags and deleted.
These two columns correspond to properties that are only available for the current version of objects.

'auditentry' Table

Each action applied to an object is documented in the object's audit trail. This information is managed using the auditentry table. The data types apply to the database types postgresql and cockroachdb. This table contains the following columns:

ColumnDescriptionData Type (max. length)
objectidIdentifies the audit entry.bigint; primarykey
referredobjectidIdentifies the object for which the entry was written.
Corresponds to the general object property system:objectId.
varchar(36)
creationdate

Unique date and time of the audit entry creation to ensure traceability.

timestamptz
createdbyID of the user who requested the action for which the audit entry is created.varchar(256)
tenantIdentifies the tenant the user specified in createdby belongs to.
Corresponds to the options property tenant.
varchar(256)
actionThree digit long history code indicating how the object was imported, deleted, updated, or retrieved.
>> Audit Trail - an "Object's History"
int
traceidUnique ID to ensure traceability.varchar(64)
detailDescription of the history code.varchar(256)
versionnumberThe number of the object version to be requested.int; required
subaction
int

An example history entry can be found here:
>> Retrieving Document History Entries

'DATABASECHANGELOG' and 'DATABASECHANGELOGLOCK' Tables

The DATABASECHANGELOG and DATABASECHANGELOGLOCK tables are automatically generated and used by Liquibase. More information is available in the corresponding documentation provided by Liquibase.
>> DATABASECHANGELOG table documentation
>> DATABASECHANGELOGLOCK table documentation


Read on

Schema - Defining Object Types

Define properties and reference them in object type definitions for the entire system, for individual tenants or for a specific app. Keep reading

Retrieving Document History Entries

This tutorial shows how we can use a Java application to make a request to the Core API of the yuuvis® API system to retrieve the history entries of a DMS document. In addition, it briefly describes which history entries are generated for a document. Keep reading

application-dbs.yml

Configuration file containing database connection parameters used by the AUDIT, REGISTRY, RENDITION-REPOSITORY and COMMANDER services. Keep reading