A2v10 Platform documentation
UK


Data models

Data models are the main items that make up a business application. A model is a representation of a business entity such as a customer, a supplier, or a document. It should be noted that the model is namely a business entity and it is abstracted from the database tables and other technical details. Moreover, the system does not know anything about the existence of tables, field names, and so on. It simply calls the stored procedures that should return/receive data in the specified format.

In fact, the model is a hierarchical object consisting of scalar values, other objects, and arrays.

The system can perform just four actions with the model:

  • Get a list of instances.
  • Get one instance.
  • Save an instance.
  • Execute a command.

To build the model (and its metadata), the platform calls certain stored procedures. Their names are constructed from the model name by adding the special suffixes to the name. Possible model suffixes:

  • .Index - load a list of instances.
  • .Load - load one instance.
  • .Metadata - load metadata to store.
  • .Update - update an instance.

The stored procedures return data as multiple sets (recordset). To construct metadata, field names and some service fields and service sets are used. The use of field names (rather than their values) is necessary because you need to be able to build the models with the correct structure, even from the empty recordsets

Data model types