You are here: Visual LANSA Logical Modeler > 10. Building a Model > 10.1 Sequencing the Builds

10.1 Sequencing the Builds

The sequence of the builds and the entities you select for building are very important because of entity dependencies. In general, the sequence of the builds is as follows:

Repository fields are the starting point for all work in LANSA. Fields must be defined before a file can be created. Files must be defined before relationships can be added.

It is important that you synchronize your building due to file relationships. An entity with no relationships to other entities could be built on its own. The Relationships build which needs to create a file look-up validation rule is expecting the other database file to exist.

For example, if you have three entities in your model, you should perform a Repository fields build for each of the three entities first. Once completed successfully, you would perform the database build for each entity. If all entity builds are successful, you would build the relationships.

The Logical Modeler provides a builder queue facility which simplifies the build process by synchronizing the entity builds for you.

Build Repository Fields

The repository fields build converts your entity's elements into LANSA Repository field definitions based on the element's data type or physical definition. The field definition is created and, if a data type has been specified, validations and help text from the data type are copied. If element notes were created, they are transferred as field-level help text.

Validation rules in the repository are flagged as either "coming from the Logical Modeler" or being "added afterwards". Validation rules added afterwards (i.e. manually in LANSA) are not lost when the elements are rebuilt in the repository.

Build Database File

The database build creates a database file for the entity. The fields within the file will be based on the elements within the entity. Logical views for the file will be based on relationships and user views.

The database build will also create new elements in the repository based on the physical file layout. For example, any inherited elements must be defined to the repository before the physical file can be defined.

Depending on entity type, a database build may not be allowed – Conceptual entities cannot be database built.

All repository field builds should have been completed before the database builds are submitted.

Build Relationships

The relationships build is responsible for creating the Access Routes and Referential Integrity validations which result from relationships. For example, a join relationship will result in the creation of an Access Route and a file look-up validation rule.

Relationship builds apply to entities which are related to other entities. Relationship builds cannot be performed if the related entities have not been database built.

Depending on entity type, a relationship build may not be allowed – Conceptual entities cannot be relationship built. All database builds should have been completed before the relationship builds are submitted.