How to build denormalised table with in the mendix domain model?

0
Hi all, I have an entity with 100 fields. Half of them are formula fields(calculated fields). I am using them in a java action which will exports the data to an excel file. It is working fine. Now I want to save the data of all 100 fields with in the database. For that I want build a denormalised table with in the mendix domain model which will saves the data of 100 fields and I want to update this table with the new values for every 5 minutes. How can I build this? Is it possible to do so? Hope you got my question. Thanks in advance. Regards, Venkat
asked
1 answers
4

I suppose you are talking about calculated attributes? 

if so, why can you not do these calculations once every 5 minutes for these objects and write them to an object when setting up the data. Calculated attributes can be a major hit to your performance because they are calculated every time you retrieve the object. Best practice would be to not use calculated attributes but calculate the attributes once beforehand (or in your case every 5 minutes with a scheduled event or something) and then commit them once to your database.

It might be a good idea to look through the learning paths in the mendix academy where you can learn about the domain model, microflows, best practices etc. 

https://learn.mendix.com/

answered