Domain Model Normlization - Mendix Forum

Domain Model Normlization




Here I'm talking about enterprise applications, by the time the domain model becomes bigger, larger, and more complex. 

Suppose that you have an entity that contains the core date of the application lets call it “Request”, by the time the Request entity contains 100+ attributes, so as a part of enhancing the app, I will split the Request entity into small entities, mostly with 1-1 association.


Taking this decision with a live enterprise app with millions of records inside will be a risk, what I'm doing currently is releasing my app twice :

at the first release:

  1. Create the new entities and release them without deleting the original entity.
  2. Create a Microflow to move data to the new entities and set the associations.

When everything goes well, at the second release we have to remove the attributes from the original entity.


Now my suggestion is:

In the domain model, when we are moving(Cut and paste) the attributes from the original entity to the new one, let the studio confirms if this is a migration process, so the sequence of executing the DB synchronization will be different, currently if we move(Cut and paste) and attribute from an entity to another the synchronization will:

  1. Drop the first column, so we will lose all the data inside.
  2. Create the new entity with its column.

Instead, it could be better if the synchronization :

  1. Create the new entity with the new column.
  2. Move the date and set the association.
  3. Drop the original attribute.


I would like to hear from experts opinion on this case/idea.


Best Regards.

0 answers