Show TOC

Persistent RolesLocate this document in the navigation structure

Use

When a persistent role is used, its instances are written to a separate table. You can use persistent roles to avoid performance problems when generic accesses to relationships are made.

If the relationship type is not entered when the relationships are read, performance problems can occur because the relationship records are distributed to multiple tables. If an object can occur in several relationships and several roles, it is possible that the system must search for entries in a large number of relationship tables in all of these roles, even if the object does not occur in any relationship at all.

You can avoid this problem by using persistent roles. It is then adequate to find an access to all roles in which the object occurs. The relationship record can be searched in a targeted way in the relationship tables which use the corresponding role.

As a result of the persistent roles, it is possible that there will be a very large table with redundant information. You therefore have to avoid persistent roles if relationships (in which a role type occurs) are not to be accessed generically, but rather only with the entry of the relationship type.

Example

The existence of role records is a prerequisite for reading document flows and for the display of relationships using generic object services.

Relationships that are used technically (that is, always with a specific relationship type or several from the same table) like for example notes or attachments, do not need persistent roles because the relationship type is entered when the relationships are read.

The following table shows an overview of the accesses when reading related objects with and without persistent roles. Here, the ideal situation that no accesses to tables of the previous service are necessary is used. For comparison purposes, the accesses for the relationship service used before Release 6.10 are additionally given.

Problem

Database Accesses Without Persistent Roles

Database Accesses for Persistent Roles

Read relationships for object

n relationship tables in which the object type can potentially appear.

If no relationship there is 1 access. Otherwise: 1 + n relationship tables in which the found roles can occur.

Read relationships for object, enter role

n relationship tables in which the object type can potentially appear.

If no relationship there is 1 access. Otherwise: 1 + n relationship tables in which the specified roles can occur.

Read relationships for object, enter relationship type

1 access, if all relationship types are saved in the same relationship table.

1 access, if all relationship types are saved in the same relationship table.

Check existence of relationships

Corresponds to the reading of the relationship

1 access