Skip to main content
Version: Next

Data Models & Runtime Data Set

Data models are a way to represent business objects and their relations into an application.

A Data Model is composed of Data Types and relationships between them. Properties can be added to these types and data types can be connected together in order to create relations.

Any data type (from the Marketplace) can be added as a relation of another data type. Each property and relation of a model is displayed inside its box. The data types which are defined in other Data Models are available in the Marketplace (if imported/visible). You can delete the data type by clicking on the Delete button.

data_model

When creating a Data Model, it is recommended to also create a set of helper logic bricks to make it easier to manipulate that data. From the Data Type Editor’s contextual menu, Generate Constructor/Generate Getter/Generate Setter opens a wizard to select from the list of available Folder(s) (a new Folder can also be created) where the constructor/getter/setter are generated and saved as pre-defined Actions and Functions.

The same menu allows generating forms. See the Data Helpers section for more details.

Properties

Properties are attributes of primitive types - String, Number, Date/Time, Boolean and Color. Properties are created by drag-and-dropping one of those types on the property zone of a data type. Properties can renamed or deleted.

Properties have the same lifecycle as the object: when the object is deleted, the property is deleted too.

Relations

Relations represent relationships with other data types. One single relation can link multiple objects. For example, a Car data type can have a passengers relation to a Person data type. Multiple Person objects can then be attached to the same passengers relation. Objects linked via relations have different lifecycles: when the object is deleted, a related object is not deleted.

A data type listed in the Marketplace can be drag-and-dropped on the relation zone of a Model. This creates a new relation. You can then change the name of the relation or delete it. If the target data type has been defined in that same Data Model, a line is drawn between them.

relation

Inheritance

Olympe supports data type inheritance. This is done by drag-and-dropping the data type to be extended within the Inheritance section of the Data Type.

Runtime Data Set

The Runtime Data Set is available from the Project, and allows creating, deleting and updating the data. It also allows editing the relations between the different objects.