The
otherhorizon_profileelementtable defines a many-to-many relationship between soil profile elements and alternative horizon notations, linking theprofileelementandotherhorizonnotationtypetables. This relationship allows a single profile element (horizon) to be associated with one or more additional horizon notation types and, conversely, enables the same horizon notation to be applied to multiple profile elements.
Note
Before assigning alternative horizon notations to a soil profile element, the relevant otherhorizonnotationtype entries must be defined.
otherhorizon_profileelement| Name | Type | Constraints | Description |
|---|---|---|---|
id |
INTEGER |
PRIMARY KEY | Primary Key of the Table. |
guid_profileelement |
TEXT |
NOT NULL | Foreign key to the ProfileElement table, guid field. |
guid_otherhorizonnotationtype |
TEXT |
NOT NULL | Foreign key to the OtherhorizonNotationType table, guid field. |
otherhorizon_profileelement.guid_otherhorizonnotationtype → otherhorizonnotationtype.guid (ON UPDATE CASCADE, ON DELETE CASCADE)
otherhorizonnotationtype cascades to otherhorizon_profileelement.otherhorizon_profileelement.guid_profileelement → profileelement.guid (ON UPDATE CASCADE, ON DELETE CASCADE)
profileelement cascades to otherhorizon_profileelement.For every trigger you will find:
i_ceckothprofileelementtype / u_ceckothprofileelementtypeWhen they run: BEFORE INSERT / BEFORE UPDATE
What they do: Ensure the linked profileelement is HORIZON (profileelementtype = 0).
If the check passes: Statement proceeds.
If the check fails: Aborts with: Table otherhorizon_profileelement: The associated profileelement must have profileelementtype = 0 (HORIZON).