company logo

Merged object spaces

Sometimes, one has to merge data from different databases. A typical case is merging resource databases in order to customize resources in a resource database. By providing an overload database for the ODABA system resource database, one may create customized ODABA tools using updated resources (forms, function code) and storing updates in an overload database. As long as not being changed, data is loaded from the original database. After being updated, data is stored and loaded from overload database.

Merged object spaces are used also for merging data in hierarchical object spaces of a database. Thus, overloading object spaces allows using common data from higher object spaces together with data stored for lower object spaces (e.g. user object spaces).

In contrast to workspaces, which also provide a kind of overload feature, merging object spaces is based on key look-up, while workspaces use local identity (LOID) look-up. However, when copying a database, local identities will change and workspace overloads cannot be used anymore. In contrast to workspaces, merged object spaces do not depend on identities but on keys.

The simplest way of defining merged object spaces is using external data source definitions containing multiple data source paths. For providing customized resources for ODABA tools, one may define two database locations in the DATABASE option:

    DATABASE=MyResources.dev;%ODABA_ROOT%/ode.dev

In this case, instances of an extent (e.g. ADK_Class, GUI resources) can be merged by reading first instances from MyResources.dev and adding instances from the ODABA resource database ode.dev. This allows merging existing definitions in the ODABA resource database with customer-defined definitions in MyResource.dev database.

Local collections referenced in an instance (e.g. fields or controls of an ADK_Class instance) are overloaded, too. This allows, e.g. adding fields in a customized application.

Merging data is supported for independent object spaces as well as for object space hierarchies. In order to activate merged object spaces, the application has to overload object spaces explicitly or mark object spaces in an object space hierarchy as overloaded (implicit overload).