Shared database for multiple apps

We are new to Mendix and want to break a large application created in OutSystems out into multiple apps on Mendix so it's not one monolithic app. However, we want to have a shared database (around 250 tables) and a shared user list that is shared among all of the apps made for this site. We did look at splitting the database up but the database tables are very interconnected.   The idea is when you set up an app in Mendix, it asks if you want to use the internal domain model or connect to an external database.  What we want to try to do is connect all of the apps we are going to create in Mendix to the same external database that has all of our tables. I have a separate question as I want to use this database for a shared list of users and have persistent login across all of the apps as well. Has anyone tried this and if so any issues? We are looking at private cloud and not sure if we should host the database on the private cloud infrastructure or on a separate VM. Thank you for any help on this!
2 answers

Hey, I would say it wont be possible or it can result in unexpected results as Mendix is having ORM which will adjust database to your app domain model. So if one App does not need some table or have it a bit different it will be removed or overwritten. Problem may be with same table used by many apps as it will display data from whole table (including records from other apps). Some tables are storing scheduled events and internal Mendix stuff which then could be marked as invalid/failed and never execute. Plus some interlocks of resourced between apps. There is as well schema problem as you can see in example from our private cloud MS SQL how it looks like. Everything is on DBO. 



I would suggest to split those apps and database to smaller use-case apps and  one 'Monolith" which will just store and manage data which you need, and expose it via Catalog -> or use standard OData/REST to this "single source of truth".


All the other apps can connect to Catalog/OData/REST and utilize same source of data among themselves. With Single Sign On I think you can utilize same source of users and sync session/token info across many apps but not sure if its needed, as you can have auto SSO on entry to the app so user will see quick blink and app is on.


That's interesting problem, if you want to talk about it in more detail just reach out to me, I like some challenges like that


Hi Jason,

seeing a few question from you about Mendix specific behavior as you want to convert OS app(s) in to a Mendix landscape.


Normally I would answer your questions on the forum. Though these question hold more than the question itself. It's about the platform philosophy, app & landscape architecture etc.


We have a 2 week OS to MX program teaching the Mendix basics up to Intermediate+ level with a full comparison on Mx vs OS and how to translate your OS monolith to a Mendix app landscape and map your way of development thought process in OS to Mendix.

Feel free to reach out at 


ps: above answer is pretty straight forward and correct ;-)