Data Models
In this fundamental, we will zoom in on what data models are and how they are used within the various integration patterns we support in the platform. Then, we start our journey with a more theoretical look at the concept of data models. Following, we will zoom in on each of the three integration patterns. Finally, per integration pattern, we will explain the role of the data model within each of these three patterns.
Should you have any questions, please get in touch with academy@emagiz.com.
1. Prerequisites
- Some context on cloud functionality will be helpful.
2. Key concepts
- Data models define the structure of data related to a system or related to eMagiz itself
- Within a data model, you model out the relationships between entities
- Within a data model, you define all relevant attributes of an entity
- eMagiz uses data models in each of the patterns to structure the data (flow)
3. Data Models
In this fundamental, we will zoom in on what data models are and how they are used within the various integration patterns we support in the platform. Then, we start our journey with a more theoretical look at the concept of data models. Following, we will zoom in on each of the three integration patterns. Finally, per integration pattern, we will explain the role of the data model within each of these three patterns.
3.1 What is a data model
A data model visually represents how a system has structured its data. It can help show the relationships between entities and define the attributes on the entity level. Below is a small example of a data model.
As you can see above, we have several entities (i.e., Order, Invoice) that are related to each other in a certain way. Furthermore, we see that our entities are defined through the help of attributes. So, for example, our Order entity holds an ID, Date, and Description attribute. The data model also tells us the data types of the entity's attributes. Therefore, the picture above tells us that the ID is represented as an integer, the Date is a DateTime, and the Description is defined as a String (Text).
Lastly, data models provide information about the type of association between two entities. Within data models, there are three possible types of associations.
- One-to-One
- One-to-Many or Many-to-One
- Many-to-Many
Applying this knowledge to the example above teaches us that one Invoice contains multiple orders and that one Order contains multiple Order Lines. Furthermore, it tells us that each Order Line only holds one Address reference.
Now that we understand data models conceptually, we will focus on how they are used within each of the three integration patterns we support in eMagiz.
3.2 Data Models in Messaging
In the messaging pattern of eMagiz, we use a Canonical Data model (CDM). Canonical data models are a type of data model that aims to present data entities and relationships in the simplest possible form to integrate processes across various systems and databases. More often than not, the data exchanged across multiple systems rely on different languages, syntax, and protocols.
For more information on understanding the CDM, please check out this microlearning.
3.3 Data Models in API Management
As with every integration pattern, eMagiz allows you to create your data model. This data model can be based on standards (i.e., OTM5), custom-made, or a combination of both.
For API, the data model represents the structure of messages that you want to publish to the outside world (other parties or other internal systems).
This data model helps you create a uniform layer through which you expose your data to the outside world. Regarding the API Management pattern, we extend this uniform layer to include the data model, the security (i.e., OAuth 2.0 * Client Credentials), and the message format (JSON).
An example of an API Data model in eMagiz is shown below.
To further understand the API Data Model, please check out this microlearning.
3.4 Data Models in Event Streaming
As with every integration pattern, eMagiz allows you to create your data model. This data model can be based on standards, custom-made, or a combination.
For Event Streaming, the data model represents the structure of messages exchanged between parties using topics.
With the help of this data model, you can create a shared understanding between producers and consumers regarding what kind of data is exchanged. This can help consumers, especially, define what they can expect when consuming data and adapt their logic based on the provided information.
An example of an Event Streaming Data model in eMagiz is shown below.
For more information on how to further understand the Event Streaming Data Model, please check out this microlearning.
4. Key takeaways
- Data models define the structure of data related to a system or related to eMagiz itself
- Within a data model, you model out the relationships between entities
- Within a data model, you define all relevant attributes of an entity
- eMagiz uses data models in each of the patterns to structure the data (flow)
5. Suggested Additional Readings
If you are interested in this topic and want to learn how you can control your Cloud with the help of the eMagiz platform, please check out our microlearnings offering on eMagiz Cloud Management: