The
isbasedonobservedsoilprofiletable defines a many-to-many relationship between soil-derived objects and observed soil profiles, linking thesoilderivedobjectandsoilprofiletables. This relationship allows soil-derived objects to be based on one or more soil profiles and, conversely, enables a single soil profile to contribute to multiple derived objects.
isbasedonobservedsoilprofile| Name | Type | Constraints | Description |
|---|---|---|---|
id |
INTEGER |
PRIMARY KEY | Primary Key of the Table. |
guid_soilderivedobject |
TEXT |
NOT NULL | Foreign key to the SoilDerivedObject table, guid field. |
guid_soilprofile |
TEXT |
NOT NULL | Foreign key to the SoilProfile table, guid field. |
isbasedonobservedsoilprofile.guid_soilprofile → soilprofile.guid (ON UPDATE CASCADE, ON DELETE CASCADE)
soilprofile cascades to isbasedonobservedsoilprofile.isbasedonobservedsoilprofile.guid_soilderivedobject → soilderivedobject.guid (ON UPDATE CASCADE, ON DELETE CASCADE)
soilderivedobject cascades to isbasedonobservedsoilprofile.For every trigger you will find:
i_checkisobserved_dobj / u_checkisobserved_dobjWhen they run: BEFORE INSERT / BEFORE UPDATE
What they do: Ensure guid_soilprofile references an OBSERVED profile (isderived = 0).
If the check passes: Statement proceeds.
If the check fails: Aborts with: Table isbasedonobservedsoilprofile : Attention, the value of the "guid_soilprofile" field cannot be inserted because profile is not of type observed.