Member-only story
Complete Guide to Managing Your Mendix Database: Improve Performance, Share with Team, and Migrate Easily
In this comprehensive guide, you’ll learn practical steps on optimizing your Mendix database, effectively sharing development data among your team members, and smoothly migrating your database to different systems. Each topic includes clear explanations and actionable steps suitable for both professional and non-professional users.
Part 1: Optimizing Database Performance with Denormalization
What is Denormalization?
Denormalization means intentionally duplicating data within your database to improve read performance. Instead of continuously recalculating data such as total order amounts, you directly store these values.
How to Denormalize Data in Mendix:
1- Create a Domain Model:
- Define related entities clearly, such as “Customer” and “Order.”
- Add attributes (fields), e.g.,
TotalOrderAmount
, to store calculated values directly.
2- Configure Attributes:
- Use persistable attributes to store values that are frequently accessed, avoiding calculated fields.
3- Synchronize Your Data:
- Use Mendix event handlers (“After Commit” events) with microflows.
- Microflows automatically update your denormalized data (e.g., recalculating
TotalOrderAmount
each time a new order is saved)
Benefits:
- Faster application performance, especially for data-intensive pages.
- Reduction in computational overhead.
Part 2: Sharing Your Development Database
Why Share Your Development Database?
In Mendix, multiple developers may collaborate on a single application. Sharing the same database ensures all team members work with consistent data.
Steps to Share Your Development Database:
1- Using Built-In Database (HSQLDB):
- Mendix Studio Pro provides a built-in HSQLDB (HyperSQL DataBase).
- No external setup is required — ideal for development environments.