company logo

Extended schema definition

Besides particular schema extensions for property and data type definitions, ODABA supports more complex model extensions:

  • Copy model - provides detailed definitions for copying object instances
  • Check model - provides checking rules for object instances

The intention of these schema extensions is to provide common copy and check rules, which may solve a number of problems in a more simple way. Copy and check model usually do not solve all problems but may help in many cases.

Copy model

The copy model allows defining application specific rules for copying data. Whether the copy model specifications are used or not depends on the copy option passed to copy or data exchange functions. In order to refer to the copy model, CopyModel (COPY_model) has to be passed. Otherwise, data is copied according to the static copy option passed to the function.

The copy model allows changing the copy option for each property. Thus, by means of the copy model, one may include or exclude references or links into the data copied or in a data exchange. The value for the copy model can be defined for each property in the object model.

Check model (not yet supported)

The check model allows defining dependencies for check processed.

Standard check procedures simply check, whether mandatory fields are filled. An elementary attribute is considered as filled, when it's value differs from its initial value (if there is any) or when it is empty. Complex attributes are considered as filled, when all mandatory attributes (and references) are filled or when at least one attribute is filled in case that the complex data types does not refer to mandatory properties.

References and relationships are considered as filled, when they refer to at least one instance.

In order to improve checking rules, application specific checking functions might be implemented in database context classes.