Working with the PegaRULES database

The PegaRULES database, as initially installed, consists of about 100 tables that hold all the rules, data instances, work items, history, and other concrete objects from internal classes of your Pega 7 system. Views, indexes and stored procedures support performance and other processing requirements.

By definition, external classes correspond to tables in other databases. These tables are not part of the PegaRULES database.

A database administrator can modify and evolve the PegaRULES database to meet policy, security, performance, and reporting requirements.

Related topics

PegaRULES database — Table and column basics
PegaRULES database — Initial Database tables
PegaRULES database — Views and Indexes
PegaRULES database — Schema changes
PegaRULES database — Common tasks
PegaRULES database — Tables for work items
PegaRULES database — Tables for assignments
PegaRULES database — Tables for rules
PegaRULES database — Tables for history instances
PegaRULES database — Tables for data objects
PegaRULES database — Tables for Index- instances
PegaRULES database — Tables for Link- instances
PegaRULES database — Log- and miscellaneous tables
PegaRULES database — System tables
PegaRULES database — Triggers and stored procedures
PegaRULES database — How to encrypt the Storage Stream for selected classes
Data Model category — Classes and Properties page
Using the Column Populator utility
Performance tool — Setting DB Trace Options
How to expose a property as a database column
How to detect lengthy PegaRULES database operations
How to limit database connections
About the RuleSet Delete tool
How to address advanced reporting requirements
How to monitor Storage Stream operations
How to detect lengthy PegaRULES database operations
How to set up a declarative index
How to detect when a database query length has exceeded a specified threshold
Understanding the pzInsKey property
How to detect database list operations that return many rows

Basics

Tables and views in the PegaRULES relational database become visible through Database Table instances (Data-Admin-DB-Table).

For example, the Data-Admin-Operator-ID class defines users and their organization. The property pyUserName in that class can contain as its value a text string for a user name. When your system is first installed, instances of the Data-Admin-Operator-ID class are saved as rows in the pr_operators database table, identified in the database table instance named Data-Admin-Operator-ID. The column named pyUserName contains the text string for the name.

Your applications can use list view rules, summary view rules, or the Obj-Browse method to generate SQL statements that search the database and generate reports for managers or developers. (You can also use Connect SQL rules to search the database, but this is not recommended except in unusual situations.)

In a production system, you can reduce the performance impact of report queries on the PegaRULES database by mirroring all or part of the database (through normal database software capabilities) and identifying the mirror as a reports database in the Database table instances.

For security and performance reasons, Pega 7 uses prepared statements when accessing the PegaRULES database. The SELECT, WHEN, and other parts of the SQL statements are parameters to the prepared statements.

You can host the PegaRULES database on a separate server from the server (or servers) that execute Pega 7 rules. In such configurations, ensure that communications between the Pega 7 servers and the database server have high bandwidth and low latency. In a wide area network where the database server is remote from one or more Pega 7 servers, local database replication may be necessary to achieve good performance.

Naming conventions

When initially installed, objects in the PegaRULES database follow a naming convention, using these prefixes:

Additional tables and views defined for custom needs need not follow these naming conventions.

When newly installed, the PegaRULES database contains 35 tables, about 70 indexes, 40 triggers, seven views, and five stored procedures.

The initial database schema

A snapshot of the schema as installed is available in HTML format on the installation media. Open the \schema\docs\ subdirectory and display the index.html topic. This shows the mapping of classes to tables:

Schema index (portion)

Click a link in the Table column to see the exposed properties in one table, such as pc_work:

Assign- exposed properties

This information does not reflect any changes made to your PegaRULES database schema since the system was installed.

Viewing and modifying the current database schema

Use the Modify Schema wizard to see the current schema of any table in any database that your system accesses.

If the Database data instance (Data-Admin-DB-Name class) for the PegaRULES database contains the appropriate User ID and password for the database, you can select a Single Value mode property from the pzPVStream column and make it an exposed column. See How to expose a property as a database column.

Caution: When an existing Pega 7 system is upgraded to a new version, SQL scripts may update the standard tables. To avoid possible collisions or other issues with future upgrades, make schema changes (other than simple new columns) only to copies of the standard tables and views. Adjust table rows and Data-Admin-DB-Table mappings to reference your copies. This is especially important for database views, as upgrade processing may drop view definitions and add revised view definitions.

Tracing database requests

Performance of the PegaRULES database is a major factor in overall system performance, affecting response time for interactive, browser-based users, turnaround time for services, and throughput.

Pega 7 provides multiple tools to help you debug, trace, and analyze requests from the server to the PegaRULES database:

Related PDN articles

See PDN article About PegaRULES table partitioning.

Definitions Alert log, Column Populator utility,  exposed property, external class, schema, Storage Stream, view
Related topics About Connect SQL rules
About Database data instances
About Database Table data instances

About the Modify Schema wizard
About the Performance tool
Commit method
Obj-Browse method
System limits and maximums
Understanding object locking

Help System home pageHelp Home