@@ -133,19 +133,19 @@ The following procedures are implemented to ascertain data quality in the databa
- Primary key: Ensures that uniqueness as well as a not-null condition of a column entry or a combination of column entries are satisfied. As user are not supposed to import the id column as it is automatically generated, its only relevance to the users is, that the id column needs to get selected as custom key when deleting or updating data (compare issue #10).
- Not Null: Ensures that a not-null condition of a column entry or a combination of column entries are satisfied. In the \__column_definition\_ view those columns are marked in the \_mandatory\_ column.
- Check: Ensures the satisfaction of certain conditions based on logical queries or the existence of other column entries in this row.
-<details><summary>Example1</summary>
<details><summary>Click to expand</summary>
Check constraints for numeric values: Wherever possible numeric
values are checked on insertion for their plausibility (e.g.areas, discharges, inhabitants) to be
within a meaningful range, usually \> 0 and smaller a maximum value. The catchment area of a river must
be larger than 0 km² and smaller than 7000000 km² (size of the Amazon river basin). CONSTRAINT
Values are checked based on values in other columns: If a measurement is marked as below an analytical limit, the value of the limit must be given in the corresponding column. If a measurement is marked as below the analytical limit of detection (LOD), the LOD must be given in the corresponding column.CONSTRAINT check_lod_available CHECK ((lod \> 0 AND value_below_lod IS TRUE) OR (value_below_lod IS NOT TRUE))
</details>
- Unique key: Ensures that uniqueness of a column entry or a combination of column entries are satisfied. Some unique keys are supposed to store aggregated information about its row. If this is the case, it can be seen in the description of the column. In the \__column_definition\_ view those columns are marked in the \__col_constraints\_ column with (u).
- Foreign keys: Ensures the case sensitive referencing of a column or a combination of column entries in the so called "child table" originally migrated from the "parent table", hence providing referential integrity. In the \__column_definition\_ view those columns are marked in the \__col__constraints\_ column with (f).