In the Dashboard, next to each engine model its weight is shown in terms of LCP. This value is calculated by the Designer in real-time (i.e., while the developer is designing it) as a sum of elementary weights calculated for each individual element of which the engine model is composed (classes, attributes, relationships, queries, filters, class warnings, grants, etc.).
Details on the LCP count #
To view details about the LCP count, open the engine model within the Designer and click on the Details… button to open the
LCP count details panel.
Base weight and variable weight #
Each element of an engine model has a base weight (which depends on the type of element) and a variable weight that depends on its complexity. For example, the variable weight of a derived query-type attribute depends on the number of relationships it traverses, while a filter, class warning depends on the number of parameters in its boolean expression. The rules for the weights of individual elements are listed in the Rules tab, shown in the image on the right. More details are available in the following section.
Modeling elements weighted by the LCP metric #
Native Database schema elements (classes, native attributes, and relationships). The weight of these modeling elements brings into account the basic functionality of creating, reading, editing, and deleting objects (CRUD).
Derived attributes of the Database schema, such as queries and mathematical expressions. The weight of these modeling elements increases with complexity (query path length, number of parameters in math expressions, etc.).
Constraints on the creation, modification, and deletion of objects of a class, such as unique constraints (keys), constraints on the domain of the attributes, application constraints expressed as predicates (i.e., boolean expressions based on native and derived attributes). The weight of these modeling elements increases with the complexity of the constraints.
Constraints on creating and modifying relationships between classes, such as multiplicity constraints at the extremes of the relationship, and filters on associable objects expressed as predicates (i.e., boolean expressions based on native and derived attributes of the two classes in the relationship). The weight of constraints on multiplicity is fixed, while that of other modeling elements varies with the complexity of the constraints.
Application views on the data model. Views partition data access both vertically (setting classes and attributes as visible or not visible) and horizontally (filters that make certain objects of a class and instances of a relation visible or not visible based on predicates, i.e., boolean expressions based on native and derived attributes). The weight of these modeling elements increases with the size of the visible portion of the data model and with the complexity of the defined horizontal partitioning filters.
Grants of each user profile on each application view. Grants allow you to specify for each user profile and for each application view accessible from that profile, the rights that profile has over each class, attribute, or relationship enabled in that application view. The weight of these modeling elements grows with the number of profile/application view combinations defined in the engine model.
LCP and pricing #
The weight of an engine model is a key pricing parameter because it measures both the complexity of the generated application and the computational cost incurred by the Livebase platform in generating it.
Exporting the calculation of LCPs to an Excel spreadsheet #
After opening an engine model in the Designer, click on the Details… button to open the
LCP count details panel. Click on the Export as XLSX button found in the lower right corner of the panel and confirm by pressing the Save button To export the LCP count in
Exporting a report of the total LCPs generated by the user in the current month. #
From the Cloudlets section of the Dashboard, click on the orange number followed by the blue writing
LCP generated this month shown in the image on the right. After clicking on the number you will be able to export the report of the total LCPs generated in the current month in
.xlsx. format. Confirm by pressing the Save button.