App development: internal or external database?

Hello community,

i want to ask , for example you want to develop another app and use it in dhis2 will you be obligated to use dhis2 database and add more tables or you can also design your own database and integrate that app with dhis2.

may you also please tell me how it works if there is a documentation i can read please share it.

Hi @mugisha_alain

When developing an app to be installed in the App Platform, to deal with the metadata and data, we’re using queries and mutations. You can learn more about that here: https://www.youtube.com/watch?v=dnagTunwHls

Also, it is safer, more secure, and more flexible to use the dhis2 database, but could you share more about the use case to understand why an external database is needed? In that case you’d be integrating between dhis2 and an external service. There are lots of examples and info in integration

I hope this helps.

Hi @mugisha_alain. In addition to @Gassim’s suggestion, I also wanted to add that the DHIS2 provides a resource (api/dataStore) where you can define data in formats of your choice (Data Store - DHIS2 Documentation).

Creating data store namespace/keys and adding data there is sufficient for many apps, and is easier to set up compared with, for example, integrating to an external database.

As Gassim already mentioned, we might be able to provide more concrete suggestions if you would like to share more details of what you are trying to achieve.