dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21836
[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 717: Update on sql views and resource tables
------------------------------------------------------------
revno: 717
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Fri 2013-03-29 12:56:14 +0100
message:
Update on sql views and resource tables
modified:
src/docbkx/en/dhis2_user_man_data_administration.xml
--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs
Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== 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 @@
</section>
<section id="resourceTables">
<title>Resource tables</title>
- <para>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. </para>
+ <para>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.</para>
<itemizedlist>
<listitem>
- <para>Organisation unit structure (orgunitstructure)<indexterm>
- <primary>orgunitstructure</primary>
- </indexterm></para>
+ <para>Organisation unit structure (_orgunitstructure)</para>
<para>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.</para>
</listitem>
<listitem>
- <para>Exclusive organisation unit groupset structure normalized (orgunitgroupsetstructure)</para>
- <para>This table provides information about the which organisation units are member of which organisation unit group sets.</para>
- </listitem>
- <listitem>
<para>Data element group set structure (_dataelementgroupsetstructure)</para>
<para>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.</para>
</listitem>
@@ -235,15 +233,38 @@
<para>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.</para>
</listitem>
<listitem>
- <para>Data element category option combo name (categoryoptioncomboname)</para>
- <para>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.</para>
+ <para>Data element category option combo name (_categoryoptioncomboname)</para>
+ <para>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.</para>
+ </listitem>
+ <listitem>
+ <para>Data element structure (_dataelementstructure)</para>
+ <para>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.</para>
+ </listitem>
+ <listitem>
+ <para>Period structure (_periodstructure)</para>
+ <para>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.</para>
</listitem>
</itemizedlist>
</section>
<section id="sqlView">
<title>SQL View</title>
- <para> 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. </para>
<para>The SQL View functionality of DHIS2 will store the SQL view definition internally, and then materialize the view when requested. </para>
+ <para>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.</para>
+ <para>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.</para>
<para/>
<section>
<title>Creating a new SQL view</title>