Hello, I have a problem with designing my app, as I don't know how to approach database access (PostgreSQL). I hope you can help me. I'm going to share my options, and maybe you could suggest some more. The options I currently have are: Using the 'external database connection' or 'database connection' modules. This works correctly, but it's the most complicated because I have to manually perform all the necessary queries (insert, update, delete, etc.). The second option is through 'database replication'. With this, I can replicate the database (retrieve data from the PostgreSQL database). The problem is that when working locally or deploying the app, if I perform an insert, it doesn't happen; I would have to do it directly via SQL statement to the PostgreSQL database. Finally, the last option, which would be ideal if it worked correctly, is Synchronization. This involves going to Settings > Configuration and adding the PostgreSQL database. The database syncs, many tables are created, and local insertion works perfectly; what you insert locally is shown in the database and vice versa. The problem comes when publishing, as it seems to use some kind of private cloud or something similar. That's why I wanted to know what the best option is or if I'm missing something along the way. If there's any other way to do it correctly, I hope to hear from you. Tell me how you do it. Best regards, and thank you.
asked
Alejandro Sánchez RUuiz
2 answers
0
Mendix applications are cloud native by default, and usually run on one of the clouds supported my Mendix. In that scenario, the database is an externally connected resource handled by the cloud you run on, so no configuration is required.
You can deploy Mendix apps on-premise, where you can manually configure the database used by your app.
Please refer to the documentation on deployment for details.
The database connector and database replicator are modules used for integrating with external database systems, and the settings in Studio Pro are meant for local development.
I hope this help
answered
Lennaert Goris
0
Hi,
I would say 1st option is most convenient and used widely, we have a project in which we are using snowflake and we have connectors.
We are using statement to insert delete or update
2nd option you mentioned won't work for obvious reason because direct manipulation of retrieved data won't affect the real data , you will have to do via firing the statement only.