## 3 Comparison of ASL and Genio Languages
### Data Entities  
The elicitation and representation of data entities are usually defined as the first steps of the development process of model-driven business applications (in parallel with use cases or scenarios specification). Data entities denote the key concepts used in domain modelling, data modelling, or data specification [32; 37]. Figure 4 shows a fragment of ASL metamodel focused on data specification, which includes DataEntity, DataAttribute, and Constraints concepts. A DataEntity denotes a data element defined by several DataEntityConstraints and DataAttributes. A DataAttribute represents a data value of a particular type (e.g., Integer or String) and is characterised by several DataAttributeConstraints. A DataAttributeConstraint can be used to mark a DataAttribute as a primary key of a DataEntity, to reference other DataAttributes denoting foreign keys, etc. Spec. 1 shows a partial ASL specification of data entities that support the IMS system, considering some of the usual properties an invoice (and invoice lines) shall include. On the other hand, Figure 5 shows a fragment of Genio's metamodel focusing on data entities and related constructs based on Genio's terminology. A Table aggregates a set of TableFields and WriteConditions. TableFields are similar to ASL's DataAttributes, representing a data value with a particular data type. However, Genio supports the specification of different types of formulas, which allow these values to be automatically computed. TableFields can also reference Enumerations, which aggregate a set of Enumeration elements uniquely identified by their id and include a user-friendly description. Finally, WriteConditions are logical expressions that can be defined to enforce business rules at the Table level. For instance, considering the data attribute \"Value Without VAT\" of the data  
Figure 4: Partial ASL metamodel with data entities-related constructs (UML notation). entity \"Invoice\", a WriteCondition can be employed to validate if this value is greater than or equal to zero. If the condition is not met, the record cannot be updated. By examining how common concepts are expressed in both languages, we can conclude the similarity between these two metamodels. For instance, some aspects, such as identifiers, titles, or constraints, are described similarly in both languages. However, concepts like a field's type are not directly translatable, requiring additional mapping between the representations in both languages. Finally, some minor aspects (such as the plural form of a field's title) can be defined in Genio but not in ASL, and there are some limitations in Genio specifications when compared to ASL, such as the character limit imposed on the definition of data entity and data attribute identifiers. Still, performing an in-depth analysis focused on data attributes reveals key differences between them that our solution shall take into consideration:  
Figure 5: Partial Genio metamodel with data entities-related constructs (UML notation). **Primary keys. ** In ASL, the concept of a primary key is defined as a constraint of the data attribute, whereas Genio implements it as a data attribute type. In ASL, it is possible to specify different data entities that use distinct data attribute types for their primary key data attributes, while Genio enforces that the same data attribute type is used for all primary keys. This is a limitation in Genio, as the optimal data attribute type to be used as a data entity's primary key depends on its most common use cases. For instance, using integer primary keys reduces the size of the database, while using GUID primary keys improves the generation of random new keys. **Data enumerations. ** Regarding the definition of data enumerations, ASL can be improved since it allows only the text values to be specified, while Genio data enumerations have keys associated with the values. For example, the value \"Invoice\" of data enumeration \"Document type\" could have an additional key such as \"I\".