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:
Column | Description | Data Type (max. length) |
---|---|---|
objectid | Corresponds to the general object property system:objectId . | uuid |
versionnumber | Corresponds to the general object property system:versionNumber . | int |
basetypeid | Corresponds to the general object property system:baseTypeId . | varchar(36) |
objecttypeid | Corresponds to the general object property | varchar(1024) |
createdby | Corresponds to the general object property system:createdBy . | varchar(256) |
lastmodifiedby | Corresponds to the general object property system:lastModifiedBy . | varchar(256) |
creationdate | Corresponds to the general object property system:creationDate . | timestamptz |
lastmodificationdate | Corresponds to the general object property system:lastModificationDate . | timestamptz |
properties | Stores all properties and their values that are assigned to the object based on its object type. >> Schema - Defining Object Types | json |
tenant | Corresponds to the general object property system:tenant . | varchar(256) |
contextid | varchar(64) | |
rendition | Stores all properties and their values that describe available renditions for the object. >> Renditions | json |
cs_length | Corresponds to the content stream property length . | bigint |
cs_mimetype | Corresponds to the content stream property mimeType . | varchar(128) |
cs_filename | Corresponds to the content stream property fileName . | varchar(1024) |
cs_digest | Corresponds to the content stream property digest . | varchar(64) |
cs_contentstreamid | Corresponds to the content stream property contentStreamId . | varchar(1024) |
cs_repositoryid | Corresponds to the content stream property | varchar(64) |
acl | json | |
internaldata | int | |
cs_range | Corresponds to the content stream property range . | varchar(2048) |
traceid | Corresponds to the general object property system:traceId . | varchar(64) |
versionnumber | ||
cs_archivepath | Corresponds to the content stream property | varchar(2048) |
tags | Corresponds to the general object property | json |
deleted | Flags 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:
Column | Description | Data Type (max. length) |
---|---|---|
objectid | Identifies the audit entry. | bigint; primarykey |
referredobjectid | Identifies 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 |
createdby | ID of the user who requested the action for which the audit entry is created. | varchar(256) |
tenant | Identifies the tenant the user specified in createdby belongs to.Corresponds to the options property tenant . | varchar(256) |
action | Three digit long history code indicating how the object was imported, deleted, updated, or retrieved. >> Audit Trail - an "Object's History" | int |
traceid | Unique ID to ensure traceability. | varchar(64) |
detail | Description of the history code. | varchar(256) |
versionnumber | The 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