# Locks and links

<a id="database.doclock"></a>

## doclock

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Holds active locks on DMS objects. One row per locked object. Populated by checkout jobs and removed by checkin / undo-checkout.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `object_id` | `int` | — | ID of the locked object (references `objectX.id` / `stammX.id` / `registerX.id`). |
| `object_type` | `int` | — | Object-type ID — determines the target table. |
| `user_id` | `int` | — | ID of the locking user. References [benutzer.id](users_and_groups.md#database.benutzer). |
| `user_time` | `int` | — | Timestamp of the lock (UNIX time). |
| `info` | `int` | — | Additional information (bitmask). |
| `fileinfo` | `int` | — | File information. |
| `station` | `nvarchar` | 128 | Station from which the lock was placed. |

### Usage by Server-API jobs

* [dms.CheckOutDocument](../dms.md#dms.CheckOutDocument) — sets the lock.
* [dms.CheckInDocument](../dms.md#dms.CheckInDocument), [dms.UndoCheckOutDocument](../dms.md#dms.UndoCheckOutDocument) — remove the lock.
* [dms.GetCheckedOutDocuments](../dms.md#dms.GetCheckedOutDocuments) — lists active locks.

<a id="database.hyplnk"></a>

## hyplnk

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Holds hyperlinks (cross-references) between DMS objects. Each row is a directed relation from object 1 (`obj_id1`/`obj_typ1`) to object 2 (`obj_id2`/`obj_typ2`), including validity, audit fields and an external relation ID.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `obj_id1` | `int` | — | ID of the source object. |
| `obj_typ1` | `int` | — | Object-type ID of the source object. |
| `obj_id2` | `int` | — | ID of the target object. |
| `obj_typ2` | `int` | — | Object-type ID of the target object. |
| `medium` | `int` | — | Medium identifier. |
| `name` | `nvarchar` | 24 | Short name of the hyperlink. |
| `textid` | `nvarchar` | 32 | Text ID / identifier. |
| `flag` | `int` | — | Status flags (bitmask). |
| `valid_from` | `int` | — | Valid from (UNIX time). |
| `valid_to` | `int` | — | Valid to (UNIX time). |
| `ensured` | `int` | — | "Ensured" flag (relation validated). |
| `checked` | `int` | — | "Checked" flag (relation verified). |
| `osrelid` | `nvarchar` | 32 | GUID of the relation. |
| `osreltextid` | `nvarchar` | 32 | GUID of the relation text. |
| `osiobjid` | `int` | — | Internal relation object ID. |
| `osiobjtype` | `int` | — | Internal relation object type. |
| `created` | `int` | — | Creation timestamp (UNIX time). |
| `createdby` | `nvarchar` | 248 | User name of the creator. |
| `modifytime` | `int` | — | Timestamp of the last change (UNIX time). |
| `modifyuser` | `nvarchar` | 248 | User name of the last modifier. |
| `deleted` | `int` | — | Delete marker. |
| `osuser` | `int` | — | User ID of the creator. |

<a id="database.combined"></a>

## combined

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Holds parent/child relations between documents. Used for combined documents (e.g. a container document composed of multiple individual documents).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `docid_par` | `int` | — | ID of the parent document. |
| `docid_cld` | `int` | — | ID of the child document. |
| `doctype_cld` | `int` | — | Object-type ID of the child document. |
| `objpos` | `int` | — | Position of the child within the parent (order). |
| `type` | `int` | — | Relation type (internal bitmask). |
| `flags` | `int` | — | Flags (internal bitmask). |
| `rights` | `int` | — | Permission marker of the relation. |
