Data Model Designer
  • 27 May 2021
  • 7 Minutes to read
  • Contributors
  • Dark
    Light

Data Model Designer

  • Dark
    Light

Article summary

Purpose of this document

This guide will describe all modeling objects that can be used to define a data model, and their respective properties.

Introduction

The CA-DatamodelBuilder tool is the tool for designing data models. A data model can be referenced from a portlet, but in future releases the idea is that it can also be referenced from a workspace workflow or an execution point. The outcome of parsing the data model in runtime is an SQL-query to the underlying database.

Modeling objects

The modeling objects differ in some extent from each other, some of them are mandatory, others are optional.

Complex Model

The Complex Model is the container for the entire data model, and it is automatically created upon data model creation.

Properties

Changed Date

Date for the latest change

Creation Date

Date for the creation of the data model

Name

The name of the data model

 

Context Menus

 

Add Simple Model

Add a simple model

Simple Model

The Simple Model, and its different building blocks put together, forms an SQL-query that will be executed in the underlying database. A Complex Model can of course contain several Simple Models, and the Simple Models are executed in the same sequence as they are described in the Complex Model. Simple Models can also reference other Simple Models in the same Complex Model, see paragraph 3.6 Dependency.

Properties

DB Access Type

inout – update/read from the database

in – update the database

out – read from database

none – create an empty data instance

ID

The ID of the simple model

Index

The sequence index

Key Index

The key index on the master table

Master Table

The name of the master table

Metadata ID

The metadata ID where the master table reside

Name

The name of the simple model

Result Type

single – only one record is read (typical for a detail)

multi – several records are read (typical for a browse)

Rows To Extract

The maximum number of rows to extract from the database

 

Context Menus

                                

 

Add Master Table

Add a master table to the simple model. This option is only available when no master table has been selected for the simple model. 

Add Dependency

Add a dependency. This option is only available on a simple model that has other simple models “above” it.

Move Up

Move the simple model one step up.

Mode Down

Move the simple model one step down.

Reset Columns

Resets all columns in all the tables that belong to this simple model. Possible overridden values on the columns are overwritten by the default values of each column defined in the repository.

Remove

Remove the simple model.

Paste

A criterion has been copied in an earlier action, and it can be pasted here.

Generate Criteria

Generates criteria for this simple model. Based on information in the repository for the master table, the default criteria are generated automatically. This option is only available when a master table has been chosen for the simple model.

Add Criterion

Adds a non default criterion to the simple model. This option is only available when a master table has been chosen for the simple model.

 

Master Table

The Master Table is the top table from which the SQL-query is generated.

Properties

Alias

The actual name of the table in the repository. This should actually be the Id property.

Constraint

Property for an imported table. The constraint tells which column in the imported table to map to

ID

The ID of the table. In the master table case ‘Alias’ and ‘ID’ is the same. In the imported table case it is used to give the imported table a unique identity. If the same table is imported several times from a master table but with different constraints, the id is the imported table name concatenated with the constraint on which the table is imported. The ‘Alias’ and the’ ID’ properties should switch in the future.

Imported From

Property for an imported table. Tells from which table this table is imported.

Metadata ID

The metadata ID in which this table reside

 

Context Menus

 

Work With Master

Launches a dialog where table columns can be selected together with what index to use. 

Add Imported Table

Add an imported table. This option is only available if the master table references other tables as imported tables. If it does, this option is available as long as there are tables to import i.e. if the master table only imports one table and that table has been chosen as an imported table, the option is no longer available.

Remove

Remove the master table.

 

Imported Table

The Imported Table indicates that this table is imported by another table, either a master table, or another imported table. The import depth is infinite.

Properties

Alias

The actual name of the table in the repository. This should actually be the ID property.

Constraint

Property for an imported table. The constraint tells which column in the imported table to map to

ID

The ID of the table. In the master table case Alias and ID is the same. In the imported table case it is used to give the imported table a unique identity. If the same table is imported several times from a master table but with different constraints, the ID is the imported table name concatenated with the constraint on which the table is imported. The Alias and the ID properties should switch in the future.

Imported From

Property for an imported table. Tells from which table this table is imported.

Join Type

Tells what kind of join to use

inner join – a common inner join

left outer join – same as outer join

Metadata ID

The metadata ID in which this table reside

Context Menus

 

Work With Table

Launches a dialog where table columns can be selected. 

Remove

Remove the master table.

Column

The column defined in the master table or imported table. 

Properties

Alias

Table name.

Column Label Long

A label describing the field.

Column Label Short

A label describing the field.

Data Type

Shows the numeric representation of the data type for the column.

Is Key

Tells if this column is a key or not in the table.

Max Key

Tells if this column is part of the desired number of keys to use in the query.

Metadata ID

The columns metadata ID.

Name

The name of the column.

Short Name

The short name of the column.

Simple Model ID

The ID of the simple model that this column belongs to.

Table

Table name

Virtual Column

The column from which a virtual field inherits its properties.

Virtual Metadata ID

The metadata ID from which a virtual field inherits its properties.

Virtual Table

The table from which a virtual field inherits its properties.

Context Menus

 

Remove

Remove the dependency.

Criterion

There are three types of criteria. The default criterion gef_criterion_default_yesis generated by right-clicking on the master table in a simple model, and choosing ‘Generate Criteria’. Based on information in the repository for the master table, the default criteria are generated automatically. A default generated criterion can be overridden gef_criterion_overridein order to change the result of the SQL-query. The user can also add extra criteria gef_criterionto enhance the SQL-query.

Properties

Binder

A logical binder

and

or

Col1Type

The type of the left column

fld – a field in the database

var – a variable that can change its value, i.e. a previous simple model has been executed and a resulting field value from that model is mapped to this column.

fix – a fix value is set for the column

Col2Type

The type of the right column

fld – a field in the database

var – a variable that can change its value, i.e. a previous simple model has been executed and a resulting field value from that model is mapped to this column.

fix – a fix value is set for the column

Default Criterion

Yes – a default criterion generated based on information in the repository for the master table.

Override – to indicate that the default is changed manually

Identifier Left

The left identifier for this criterion. The identity is a dot ‘.’ separated concatenation of METADATAID.TABLE.COLUMN


 

 

Identifier Right

The right identifier for this criterion. It can be referenced from different parts of the runtime workspace environment.

Instance – the identifier references a column in a simple model within this data model.

MapData – the identifier references a variable in the map data.

SessionArea – the identifier references a variable in the session area.

Session – the identifier references a variable in the session.

DialogArea – the identifier references a variable in the dialog area.

Function – the identifier references current date or user ID

Key

Whether this criterion is generated over a key column.

true – column is key

false – column is not key

Name

Name of the criterion

Operator

The criterion operator.

=

!=

>=

<=

in

not in

asc

desc

Context Menus

 

Copy

Launches a dialog where table columns can be selected. 

Move Up

Moves the criterion one step up. 

Move Down

Moves the criterion one step down.

Remove

Remove the master table.


 

Dependency

The Dependency references another simple mode that is earlier in the sequence relative to the Simple Model that this Dependency belongs to. A Simple Model can have several dependencies listed, each Dependency referencing another Simple Model.

Properties

Dependency Reference

References a simple model that is earlier in the sequence relative to the simple model that this dependency belongs to. 

Type

The dependency has a type depending on what type of object it references. For now there is only one type – DataModel

Context Menus

 

Remove

Remove the dependency.

 

 

 


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.