Database Structure
| This page was automatically generated from the database schema dump and may be incomplete or incorrect. |
This section documents the database structure of the enaio® system — which tables exist in the database schema, which columns they carry, and how the recurring patterns of the object, stamm and register tables relate to each other. The schema is database-independent — enaio® supports several relational database backends (e.g. Microsoft SQL Server, Oracle). Data types in this documentation are given in SQL Server notation (int, nvarchar, datetime, bigint, smallint, real, image); the Oracle equivalents are NUMBER, NVARCHAR2, DATE, NUMBER(19), NUMBER(5), BINARY_FLOAT and BLOB respectively.
The structures described here are the immediate physical storage form; they are generally not modified directly (except via ado.ExecuteSQL scripts for administrative corrections), but through the DMS, Standard and Workflow engines. This documentation is intended as a reference for administrators, report developers and integration developers.
1. Schema Conventions
The database uses a mix of fixed system tables and type-specific tables per object type. The following conventions are applied throughout:
1.1. Suffix scheme
For every configured DMS object type, several tables exist whose names carry a sequential number X. X corresponds to the main type (haupttyp column) + 1 — object1 thus contains objects with haupttyp = 0, object17 those with haupttyp = 16. The full object-type ID (haupttyp * 65536 + untertyp) is described in Object-type ID.
| Name | Content |
|---|---|
|
Main object table. Holds one row per object of type X. Contains common system fields (id, timestamp, status, permission IDs, …) plus type-specific index fields. |
|
Rights table. Holds per-object permission entries (complementary to the global security system via |
|
Shadow table for index-data history. Holds the previous index-data state before each change. Only |
|
Table-field data. One table per table-field Y defined on object type X (grid field); holds one row per grid row. Common fields: |
|
Shadow variant for table fields. Common: |
1.2. Column-name convention
Index fields follow a historically grown, type-dependent positional notation (Hungarian style):
-
feld1,feld2, … — text fields (nvarchar) -
zahl1,zahl2, … — integer fields (int/smallint) -
datum1,datum2, … — date fields (datetime) -
real1,real2, … — decimal / floating-point fields (decimal/real)
The mapping "column name → semantic index field" is configured per object type and accessible via the DMS object definition (dms.GetObjDef).
System fields, on the other hand, use German-language descriptive names (anleger, angelegt, archiviert, zeitstempel, medium_doc, …) — a historical legacy.
2. Hierarchical object types
The following three pages describe the pattern — common fields, rights, shadow and table-field variants — and not individual numbered tables.
-
Master files (
stammX) — top hierarchy level (folder / case / project). -
Registers (
registerX) — subdivision within a master file. -
Document objects (
objectX) — documents (carry file content, versions, annotations). -
sdrel — structure-data relation table: master file → register → document.
-
osparregrel — nesting of registers within a folder.
7. Annotations
-
annotations — annotations (slides, notes).
-
ann_groups — annotation group assignment.
8. External systems
-
varcsystems — varc / connector configuration.
11. Permissions and profiles
The workflow organisation objects (osorg*) are documented under Workflows.
|
13. DMS object types, index fields and structures
-
osctrlpages — page controls from the object definition.
-
oslistctrl — allowed nesting of object types from the object definition.
-
oslanguages — configured languages from the object definition.
17. Remarks and texts
-
remarks — header data of the text notes
-
osremarktext — note texts under database storage
17.1. Storage of notes
Notes on DMS objects come in two kinds, held in different tables:
-
Text note — coloured free text on the object, managed in
remarks. -
Note link — a reference to another DMS object, managed in hyplnk and not in
remarks.
Both are possible on folders, registers, documents and portfolios. Their number per object is also
kept in the links column of the corresponding index table, which is what drives the note icon in
result lists.
The text of a text note is held either in the file system or in the database, depending on server
configuration. The switch sits in AS.cfg, section [System], key NoteStorage: 0 = file
system, 1 = database. It is not in the server registry and therefore cannot be reached through
krn.REGetRegValue; it can be read with
adm.GetSystemFile using FileName = as.cfg, and the file comes
back as UTF-16LE.
| Aspect | File system | Database |
|---|---|---|
Location of the text |
one |
column |
|
medium ID of the |
|
|
the same medium ID |
|
|
|
key in |
|
empty |
the |
Length limit |
none |
8000 characters; beyond that the import fails with |
Searching the note content |
not possible |
possible |
the responsible jobs |
not usable, see the warning below |
|
Creating, changing and deleting through XML |
dms.XMLUpdate with |
the same |
The three std remark jobs require file-system storage. Under database storage
std.GetRemark and std.DeleteRemark
fail with -1043201745, and std.StoreRemark silently migrates the
note back into the file system: the job returns 0, creates a note file, sets remarks.medium to
the medium ID and leaves the row in osremarktext orphaned with the old text.
|
The statements in this section were measured against enaio® server 12.0 (axsvckrn 12.0.799, DMS engine 12.0.769.25242, Microsoft SQL Server 2022).
17.1.1. Location of the note files
The root directory is held in path in the row with flag = 2, one per
server group. Below it
the files are nested by object type and note ID. All four components are hexadecimal, the
directories two digits, the file name eight:
<path>\NOTE\<main type>\<sub type>\<note ID mod 256>\<note ID>.txt
Example for note ID 146610 (0x00023CB2) on an object with main type 4 and sub type 1:
C:\enaio\server\NOTE\04\01\B2\00023CB2.txt
A note file written by the server starts with the UTF-8 BOM and ends with a NUL byte, so eleven characters of text come to 15 bytes. A file handed over through std.StoreRemark is stored verbatim instead.
17.1.2. Switching the storage mode
There is no automatic migration. After switching to database storage, existing text files stay
readable unchanged and keep their medium ID in medium.
An individual note moves only when its text is changed, that is on
<RemarkText action="UPDATE_TEXT">. It is then given a newly assigned textid, medium is set to
NULL and the old .txt file is removed. UPDATE_COLOR does not trigger the move: the colour
changes and the note stays in the file system.
An existing long text is not truncated when it moves, because there is no path that would carry it
over. UPDATE_TEXT replaces it, and a new text longer than 8000 characters is rejected with
-1028.
24. Workflows
The workflow engine stores models, running processes, history and management data in dedicated tables prefixed oswf. History tables additionally carry the prefix oswfh. The workflow organisation (users, roles, departments, classes and attributes) lives in the osorg* tables and is used both by the workflow engine and by the DMS security system.
Models and definitions
Masks and list UI
Processes and activities (runtime)
Organisation and performers
Workflow-specific performer assignments:
Organisation master data (osorg*) — users, roles, departments, classes, attributes:
Timers
Routing lists
Reports
History (oswfh*)
25. Laboratory (LIMS)
Tables of the laboratory-data integration (Laboratory Master/Transaction Tables):