Previous Topic: TechniquesNext Topic: Techniques


Adding a New Model

The following activities can be considered as adding a new model to the encyclopedia:

Each of the activities creates objects, associations, properties, and text. The activities place a read lock on the source model to prevent changes to the model while the activity occurs. Periodic commits are executed to alleviate the scope and duration of the database locks.

When you add a new model, the model is initially put into an unusable state. The row in DMDL is inserted first, then all objects, properties, associations and text are added. Finally, the DMDL row is put into a modifiable state. Unless the add completes normally and the final step of updating DMDL occurs, orphan objects are left in the database. The orphan objects do not affect other operations, but the incomplete model is unusable. You can clean up the orphan objects with the cleanup utility.

For large models, the overall effect of a failed activity, such as a failed copy, can be substantial. Because a copy does periodic commits, orphan objects are left in the encyclopedia following a failure. For a large model in an encyclopedia where disk space is in short supply, you may need to clean up the orphan objects and REORG the database before being able to perform the copy again.