=== modified file 'src/docbkx/en/dhis2_user_man_data_administration.xml' --- src/docbkx/en/dhis2_user_man_data_administration.xml 2012-04-16 13:42:40 +0000 +++ src/docbkx/en/dhis2_user_man_data_administration.xml 2013-03-29 11:56:14 +0000 @@ -206,19 +206,17 @@
Resource tables - Resource tables are supporting tables that are used during analysis of data. One would typically join the contents of these tables with the data value table when doing queries from third-party applications like Microsoft Excel. Simply select the tables that should be regenerated and press "Generate tables". Regeneration of the resource tables should only be done once all data integrity issues are resolved. + Resource tables are supporting tables that are used during analysis of data. One would + typically join the contents of these tables with the data value table when doing queries from + third-party applications like Microsoft Excel. Simply select the tables that should be + regenerated and press "Generate tables". Regeneration of the resource tables should + only be done once all data integrity issues are resolved. - Organisation unit structure (orgunitstructure) - orgunitstructure - + Organisation unit structure (_orgunitstructure) This table should be regenerated any time there have been any changes made to the organisational unit hierarchy. This table provides information about the organisation unit hierarchy. It has one row for each organisation unit, one column for each organisation unit level and the organisation unit identifiers for all parents in the lineage as values. - Exclusive organisation unit groupset structure normalized (orgunitgroupsetstructure) - This table provides information about the which organisation units are member of which organisation unit group sets. - - Data element group set structure (_dataelementgroupsetstructure) This table provides information about which data elements are members of which data element group sets. The table has one row for each data element, one column for each data element group set and the names of the data element group as values. @@ -235,15 +233,38 @@ This table provides information about which data elements are members of which categories. The table has one row for each data element, one column for each category and the names of the category options as values. - Data element category option combo name (categoryoptioncomboname) - This table should be regenerated any time there have been changes made to the category combination names. It contains readable names for the various combinations of categories. + Data element category option combo name (_categoryoptioncomboname) + This table should be regenerated any time there have been changes made to the category + combination names. It contains readable names for the various combinations of + categories. + + + Data element structure (_dataelementstructure) + This table provides information about all data elements and which period type + (frequency) they capture data at. The period type is determined through the data set + membership and hence relies on data elements to be member of data sets with similar period + types to have a defined behavior. + + + Period structure (_periodstructure) + This table provides information about all periods and which period type they are + associated with. For each period type with lower frequency than itself, it contains + information about which period if will fall within.
SQL View - Database administrators must be very careful about creating database views directly in the DHIS 2 database. Certain DHIS 2 operations drop and recreate tables, for instance when the resource tables are regenerated. If any SQL views depend on these tables, an error will occur, since the tables are referenced in an SQL view. The SQL View functionality of DHIS2 will store the SQL view definition internally, and then materialize the view when requested. + Database administrators must be careful about creating database views directly in the DHIS + 2 database. For instance, when the resource tables are generated, all of them will first be + dropped and then re-created. If any SQL views depend on these tables, an integrity violation + exception will be thrown and the process will be aborted. + The SQL views are dropped in reverse alphabetical order based on their names in DHIS 2, + and created in regular alphabetical order. This allows you to have dependencies between SQL + views, given that views only depend on other views which come earlier in the alphabetical + order. For instace, "ViewB" can safely depend on "ViewA". Otherwise, having views depending on + other view result in an integrity violation error.
Creating a new SQL view