Jump to: navigation, search

Difference between revisions of "Database View Creation"


Line 1: Line 1:
UBIK (Dynamic Live Mode) creates an entity model on the database which is not human readable. Both, the creation of tables as well as the creation of columns uses an intern naming mechanism  which is based on object ids and not on object names.
+
UBIK 4++ (Dynamic Live Mode) creates an entity model on the database which is not human readable. Both, the creation of tables as well as the creation of columns uses an intern naming mechanism  which is based on object ids and not on object names.
 
To enable 3rd party systems as well as system administrators to consume UBIK data using database mechanism UBIK provides a mechanism which gives (read access) to the UBIK data via Database Views. The naming conventions used for the views as well as for the used columns are compatible to the naming conventions used prio UBIK Versions.
 
To enable 3rd party systems as well as system administrators to consume UBIK data using database mechanism UBIK provides a mechanism which gives (read access) to the UBIK data via Database Views. The naming conventions used for the views as well as for the used columns are compatible to the naming conventions used prio UBIK Versions.
  

Revision as of 15:38, 24 October 2022

UBIK 4++ (Dynamic Live Mode) creates an entity model on the database which is not human readable. Both, the creation of tables as well as the creation of columns uses an intern naming mechanism which is based on object ids and not on object names. To enable 3rd party systems as well as system administrators to consume UBIK data using database mechanism UBIK provides a mechanism which gives (read access) to the UBIK data via Database Views. The naming conventions used for the views as well as for the used columns are compatible to the naming conventions used prio UBIK Versions.

Overview

The creation of the views must be enabled once for every UBIK Database (project). After the mechanism was enabled the initial creation of the views must be triggered manually. Once this is done, the system takes care about keeping the Views up to date (all changes in the data model will reflect in updates of the View Structures just in time). If the System runs into an unexpected situation it will change the status and will stop updating the Views automatically. A conflict must be solved manually by the administrator.

Automatic Creation of Views

Configuration

The configuration is done using the System Settings Dialogue. You have to configure the following Settings:

Name Description
View Creation Target The target database instance in which the views get created. It cannot be the same instance like the current UBIK Instance. I suggest to have either one separat instance per UBIK Project or one Instance for multiple projects.
View Creation Database Login Database User which is used for creating the Views. If this setting is empty, the system reuses the same login information as for the current UBIK Project
View Creation Database Password Database User which is used for creating the Views. If this setting is only used if the View Creation Database Login is not empty.
View Creation Database Use Windows Authentication Possibility to configure whether the current OS Login should be used when connecting to the View Instance. Set this value to false, if you want to reuse the credentials information from the current UBIK Project.
View Creation Prefix Prefix for the current project which will be added to every single View Name. The prefix must be a 3 character (no special characters) indicator for the current project. If you plan to have the views of multiple projects hosted in one Database Instance, this value must be unique.


Enabling the View Creation

To enable the View Creation you have to change the Setting to "Enabled".

Name Description
View Creation Status To enable the automatic View Creation you have to set the Setting to "Enabled". "Disabled" will disable the mechanism. The "Error" indicates that there was an error and the mechanism has stopped working.

After the Setting is set to "Enabled" we recommend to restart UBIK.Studio (as Settings are read during the initialization of the System). The initial creation of "all" Views must be triggered using Custom Code (e.g. using the "Debug View):

  bool result = anyUbikObject.Environment.UBIKDataFactory().CreateAllViews();


Disabling the View Creation

To disable the View Creation you have to change the Setting to "Disabled".

After the Setting is set to "Disabled" we recommend to restart UBIK.Studio (as Settings are read during the initialization of the System). The removal of "all" Views must be triggered using Custom Code (e.g. using the "Debug View):

  bool result = anyUbikObject.Environment.UBIKDataFactory().DropAllViews();


Resolving an Error in View Creation

If the setting has changed to "Error" the system indicates that there was an error during the creation of Views. You will find detail information about what has happened in the corresponding Exception a/o Error Logs. Please fix the source of the problem in the data structure before enabling the View Creation. To re-enable the View Creation we recommend to first, fully disable the feature (incl. DropAllViews) and then re-enable it (incl. CreateAllViews).