I have deleted values from a data set through import, but when I try to delete data elements, I get this message: ’ Could not delete due to association with another object: DataValue’. Do the values still remain on the database? I cleared browser after deleting values.
I think deleting values from dhis 2 web application will not delete them from the data values audit table (datavalueaudit). you have to delete them by using SQL in the database.
I am not a database specialist. I am very grateful for your didactic explanation.
I have also been looking for documentation or manual about how the DHIS 2 database is structured. Without your help, I wouldn’t have known that the dataelement table is related to datavalueaudit table. Is there any documentation or manual available about relationships between tables that make up the DB?
In your example above. it is pretty clear how the DE table and the datavalueaudit are related because of foreign keys.
Tracker programs have also aroused interest. I have built some tracker programs but I do not how tracked entites, program stages, Program stages DEs, etc are related. I would like to have a clear image of how tables are related in tracker programs