DHIS2 database diagram available for reference?

Howdy,
We are trying to find some links in the database e.g. translation entries, but some of the table names are not that consistent e.g. Options. For example, we are wanting to find out Data Elements & Options that:
a. Do not have a (FR) translation entered
b. The translation entry (modified date) is older than the DE.
Questions:

  1. Is there a database diagram available that shows the links & FKs between the (many) tables in the db?
  2. Is there a way to differentiate the translation languages by doing a SQL query?

I am comparing the tables below for #a:
Options:
SELECT * FROM dataelementcategoryoption
SELECT * FROM categoryoptiontranslations
Categories:
SELECT * FROM categorycombo
SELECT * FROM categorycombotranslations

Thanks in advance :slight_smile:

1 Like

Hi Damien,
The database ER Diagram may be difficult to find or less readable because there are several tables. But you can use the tool like PostgreSQL Maestro with its Visual Query module which can help you to know if the links exist between the tables that you will select. A kind of reverse engineering.

Thanks,

2 Likes