Maintaining Application Schema Metadata

What Is Schema Metadata?

Schema metadata about tables includes:

The system refers to this metadata when generating table triggers.

NOTE: When you create a new table, first try generating and testing table triggers without adding your table to the metadata. If it works the way you want, do not add it to the metadata. Otherwise, refer to this section and the related topics to determine how to add metadata to adjust the generation.

Defining Metadata

After you create a custom table or a custom column on a standard table, define any needed metadata as follows:

  1. Use the Application Schema Modules Metadata form to define any custom modules.
  2. Use the Application Schema Tables Metadata form to:
  3. If a table has an AlphaKey (you want to generate Next Keys for a column in the specified table), use the Application Schema Columns Metadata form to define this.
  4. If using this application with APS and you want to populate ERDBGW for APS for the new table, define the appropriate extensions in the Application Schema Tables Metadata Extensions form.

If you later remove a custom table or column from the application database schema, you must also remove the corresponding row from the application schema metadata, if that row exists.

Generating Triggers

To generate triggers using the metadata you defined, use the Trigger Management form, specifying the tables where you changed metadata.

Triggers require generation after you:

Building and Running Scripts

You can dump the metadata into SQL scripts which can then be loaded into other application databases, for example at other sites where the same table/column changes are being made. Follow these steps:

  1. In one site, define the metadata as described above.
  2. Use the Generate Application Schema Metadata Scripts form to create the following scripts, as needed:
  3. If using this application with APS, use the Generate Application Schema Metadata Extensions Script form to create a SQL script with table-based attribute extensions metadata.
  4. Load the SQL script(s) into other sites (application databases), which must also contain any applicable new or modified schema elements.
  5. At these other sites, use the Trigger Management form to generate triggers for specified tables.

For More Information

The document Insert and Update Trigger Generation, available on our support Web site, explains in much greater detail the specifics of this metadata and its use in the system.


Related Topics

Impact Schema Utility

Trigger Management

User Extended Tables Overview