Creating a separate table for a child class
Classes that are derived from a parent class using pattern inheritance share the same table with their parent class except as otherwise specified. Sharing the same table allows the table for an entire hierarchy of classes to be defined in one place.
However, you can associate a child class with a table that is different from its parent by creating a separate Data-Admin-DB-Table instance for the child. This may be desirable for performance, backup, space, or other reasons. The table that you specify for a child class overrides the table defined for the parent class.
For example, the standard schema places instances of the
Data-Party-Com
class — which identify business entities — in the
pr_data
table, using the
Data-Admin-DB-Table
instance named
Data-
. If your application includes thousands or millions of such records, consider placing them in a dedicated table. To make a dedicated table (using this example):
- Using database tools, create a table (call it myco_businesses) within the Pega database.
- Make sure that the schema includes the properties needed for every table, and that property pzInsKey is identified as the primary key using a database constraint.
- Identify additional columns for other properties to be exposed.
- Move all rows of the
pr_data
table that have Data-Party-Com as the value of the pxObjClass column into the new table. - Add a Data-Admin-DB-Table instance named
Data-Party-Com
that references the myco_businesses table. - Run the Column Populator utility to populate values for exposed columns from the BLOB column (Storage Stream).
Previous topic Clone Class Group tab Next topic Segregating cases into a dedicated table