About the visual data model interface
The schema view provides a visual overview of the individual models in a data model. The initial view contains the default role and user models that provide the basis for working with an application.
The following explains some of the navigation features available when you work with the schema view:
A. The Schema view button is shown as active to indicate that it is the current active view.
B. You can navigate to the data model list view by selecting the Models Overview button.
C. You can add new models to your Data model by selecting the New model button.
Working with individual models in the schema view
A. The default Role and User models are displayed in the initial view for all new applications. You can click on a model name to navigate to the details for an individual model.
Note: You can return to the Schema view by clicking on the Back button.
B. When you hover over a model in the schema view, a scroll bar is displayed for scrolling through the properties that are defined for a model.
You can click on a an individual property or relation to display detailed information. The detailed settings are displayed in a separate pane. You can apply new details or change existing details as required.
C. You can use the Zoom buttons to scale the visible display to between 50% to 200%. For example, press to reduce the display to 50%.
You can use the Reset button that is displayed when you hover over the Zoom buttons to reset the display to 100%.
D. You can switch the details for properties On/Off. In the above example, the properties details button is On. As shown, properties for each model are displayed. As you create additional models, this feature is useful when you want to quickly check the properties included in a data model, or use with Off to view only the model names in a complicated data model.
When the properties key is switched to Off, only the model name is displayed.
Using relations for connecting models
Relations represent the connection between the models. The relation type determines the connection between individual models. Models can have one or more different types of connections. The following lists the different relation types, describes the connection and provides an example of when it can be used:
Belongs to (many sources belong to one target)
Multiple objects as defined in the source model are related to a single object as defined by the target model.
The source model (reservation) obtains a new object property that will store an object of the target model (reservation.room), the target model (room) obtains a new collection property that stores multiple objects of the source model (room.reservations).
Many tasks are assigned to one Team.
Many players belong to one team.
Many order lines make up one order.
Many reservations belong to one room.
Has many (single source has many targets)
This means that one object of the source model is related to multiple objects of the target model.
The source model (room) obtains a new collection property that stores multiple objects of the target model (room.reservations). The target model (reservation) obtains a new object property that stores an object of the source model (reservation.room).
A project has many tasks.
A movie has many actors playing in it.
A pizza is made out of many ingredients.
One room has many reservations.
Has and belongs to many (One source has and belongs to many targets)
This is a many to many relation. Multiple objects of the source model are related to multiple objects of the target model.
The source model (user) obtains a new collection property that stores multiple objects of the target model (user.roles). The target model (role) obtains a new collection property that stores multiple objects of the source model (role.users).
A student takes many classes.
A movie involves many actors playing in it.
An author can write multiple books but a book can also be written by many authors.
A user can have multiple roles and those roles can also be applied to multiple other users.
These types of relationships involve only a single model.
Team roles in organizations - for example, an Employee model that represents the employees in an organization. Various employees can be assigned as supervisors or team leaders for multiple employees.
An employee is an employee of an organization and simultaneously the supervisor of multiple employees.
➝ Next article: Viewing relations in the Schema view