Model of a model - metamodel

Model of a model - metamodel

Every software we develop serves to solve a certain real-life problem. When I say a problem, I mean certain processes that take place in everyday life. To solve the problem, we need to analyze it first. The analysis represents the perception of certain events and entities that are an integral part of every business process.

After the analysis of the problem itself, the modeling follows. Modeling is the definition of the entities themselves and the relations between them. Usually, this is an object model that is followed by a database schema. After defining the model, the development of the application layer follows, which serves us to interact with the business process.

What if the properties of a system are such that our entities are not known in advance or are very variable? Also, what if we want to develop software that can be applied to several different tests?

The solution could be a model of a model - metamodel. The metamodel is a way to describe a particular entity without defining it during the development process of the software. Metamodel defines the attributes, rules, constraints, and relations in the model itself. With metamodel, we can achieve higher abstraction.

Database metamodel example:

Database metamodel example

On the example above, you can see how the metamodel could look in the context of the database. With META_MODEL we can define entities, with META_PROPERTY we can define which data will entities contain, and with META_VALUE we can define constraints for those data.

What can be the problem with this approach?

This approach may have its own problems. First of all, the complexity of coding, testing, performances, and integration with third-party software. High abstraction makes coding more complex and I could be difficult to cover all functionalities needed for the software we are developing. Also, every single change is very risky and could be time-consuming.

What's the solution?

As in most cases, the solution could be a compromise. It is always possible to model the system so that only part of the model is defined by the metamodel. It is even possible to make only certain parts of the entity modeled with metamodel.

For example, if we want to develop asset management software, data such as serial number, production date, price, type, etc. we can define in the model itself and we can define the data specific for each type of the product with the metamodel. In this way, the most important characteristics are defined by the model and less important with the metamodel.

The metamodel is a good way to solve generic problems, but it should certainly be cautious when using it.

要查看或添加评论,请登录

Nebojsa Bobic的更多文章

社区洞察

其他会员也浏览了