From 5782bd1550e4c95996c314b683b5755cb39228ca Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Fri, 3 Oct 2025 22:27:43 +0000 Subject: [PATCH] More documentation of EVENTS.Behavior related rules --- doc/src/tables/events.m4 | 56 ++++++++++++++++++++++++++++++++++++++++ doc/src/tables/roles.m4 | 4 +++ 2 files changed, 60 insertions(+) diff --git a/doc/src/tables/events.m4 b/doc/src/tables/events.m4 index 96fdcad..c7494b9 100644 --- a/doc/src/tables/events.m4 +++ b/doc/src/tables/events.m4 @@ -33,6 +33,58 @@ EVENTS The |EVENTS.Start| time cannot be after the |EVENTS.Stop| time. +Each of the |EVENTS.Behavior| codes has its own rules regarding what +other information must or should be present in the database in order +to retain data validity, and what each code implies about the meaning +of related data. +The following table lists these rules and implications: + +.. _EVENTS_aggression_code: + +``sdb_aggression`` (Aggression) + A row must exist on AGGRESSIONS. + +.. _EVENTS_arrival_code: + +``sdb_arrival`` (Arrival) + The |ROLES| row related to the event, the row with a |ROLES.EID| + value equal to the |EVENTS.EID| value, designates the + arriving/departing individual. + There may be at most one |ROLES| row related to the arrival event. + The system will generate a warning when there is no |ROLES| row + related to the arrival event. + + The |EVENTS|.\ |EVENTS.Start| column contains the arrival time of + the individual identified in the related |ROLES| row. + + The |EVENTS|.\ |EVENTS.Stop| column contains the departure time of + the the individual identified in the related |ROLES| row. + +.. _EVENTS_food_code: + +``sdb_food`` (Food) + A row must exist on FOOD_EVENTS. + +.. _EVENTS_grooming_code: + +``sdb_grooming`` (Grooming) + A row must exist on GROOMINGS. + +.. _EVENTS_mating_code: + +``sdb_mating`` (Mating) + A row must exist on MATINGS. + +.. _EVENTS_other_species_code: + +``sdb_other_species`` (Other Species) + A row must exist on SPECIES_PRESENT and/or on HUMANS. + +.. _EVENTS_pantgrunt_code: + +``sdb_pantgrunt`` (Pantgrunt) + A row must exist on PANTGRUNTS. + .. _EVENTS.EID: EID (Event ID) @@ -72,6 +124,7 @@ Each code has special meaning to SokweDB, controlling what additional information may, or must, be related to the event. In other words, what other tables may, or must, contain additional information about the event. + The following list summarizes the available codes: ``sdb_aggression`` (Aggression) @@ -95,6 +148,9 @@ The following list summarizes the available codes: ``sdb_pantgrunt`` (Pantgrunt) A row must exist on PANTGRUNTS. +See :ref:`above ` for futher detail regarding what related +data each code requires, or is expected to have. + |notnull| diff --git a/doc/src/tables/roles.m4 b/doc/src/tables/roles.m4 index aeeb464..64cc284 100644 --- a/doc/src/tables/roles.m4 +++ b/doc/src/tables/roles.m4 @@ -35,6 +35,10 @@ Usually, there will be at least one participant. But this is not true of events that are no more than a record of the presence of other species sighted during a follow. +For further information on the required, and expected, relationship +between ROLES, |EVENTS|, and other tables see the documentation of the +|EVENTS| table. + .. _ROLES.PID: PID (Participant ID) -- 2.34.1