Karl O. Pinc kop@karlpinc.com [Fri, 13 Mar 2026 19:07:40 +0000 (19:07 +0000)]
Fix broken link and improve date and time docs
Karl O. Pinc kop@karlpinc.com [Sun, 1 Mar 2026 01:04:53 +0000 (01:04 +0000)]
Make ESTRUS_STATES table and indexes
Karl O. Pinc kop@karlpinc.com [Sun, 1 Mar 2026 00:35:50 +0000 (00:35 +0000)]
Create ESTRUS_SOURCES table and indexes
Karl O. Pinc kop@karlpinc.com [Sun, 1 Mar 2026 00:04:02 +0000 (00:04 +0000)]
Create SIGHTING_RECORDS table and indexes
Karl O. Pinc kop@karlpinc.com [Sun, 1 Mar 2026 00:01:37 +0000 (00:01 +0000)]
Add ARRIVALS.Seq column to DDL
Karl O. Pinc kop@karlpinc.com [Sat, 28 Feb 2026 22:52:41 +0000 (22:52 +0000)]
Initial ESTRUS_STATES design
Karl O. Pinc kop@karlpinc.com [Sat, 28 Feb 2026 22:52:00 +0000 (22:52 +0000)]
New ESTRUS_SOURCES table to support non-SokweDB estrus data sources
Karl O. Pinc kop@karlpinc.com [Sat, 28 Feb 2026 22:50:08 +0000 (22:50 +0000)]
Update SIGHTING_SOURCES to support estrus data
Karl O. Pinc kop@karlpinc.com [Sat, 28 Feb 2026 22:49:17 +0000 (22:49 +0000)]
SIGHTING_SOURCES contains old BRec data
Karl O. Pinc kop@karlpinc.com [Sat, 28 Feb 2026 18:57:55 +0000 (18:57 +0000)]
Note problems with per-page HTML when file names are changed
"make clean-docs" must be run to be sure old html content is removed.
Karl O. Pinc kop@karlpinc.com [Sat, 28 Feb 2026 18:09:23 +0000 (18:09 +0000)]
Clarify when CYCLE_STATES.AsNum should be NULL
Karl O. Pinc kop@karlpinc.com [Sat, 28 Feb 2026 17:57:20 +0000 (17:57 +0000)]
Add missing substitution reference for CYCLE_STATES.AsNum
Karl O. Pinc kop@karlpinc.com [Sat, 28 Feb 2026 17:51:42 +0000 (17:51 +0000)]
Move date restriction rule from analysis results to source data table
Karl O. Pinc kop@karlpinc.com [Fri, 27 Feb 2026 20:18:33 +0000 (20:18 +0000)]
Tweak wording
Karl O. Pinc kop@karlpinc.com [Fri, 27 Feb 2026 20:09:25 +0000 (20:09 +0000)]
Create a separate section for tables populated automatically
Karl O. Pinc kop@karlpinc.com [Fri, 27 Feb 2026 19:21:32 +0000 (19:21 +0000)]
Alphabetize
Karl O. Pinc kop@karlpinc.com [Fri, 27 Feb 2026 18:17:28 +0000 (18:17 +0000)]
SIGHTINGS does not contain estrus information
Karl O. Pinc kop@karlpinc.com [Fri, 27 Feb 2026 18:12:19 +0000 (18:12 +0000)]
Spelling: estrous -> estrus
Karl O. Pinc kop@karlpinc.com [Fri, 20 Feb 2026 21:31:50 +0000 (21:31 +0000)]
Support local m4 include files
"Local" include files are in db/schemas/*/<type>/include/, where
"<type>" is functions, indexes, tables, triggers, etc.
Karl O. Pinc kop@karlpinc.com [Sat, 14 Feb 2026 23:08:02 +0000 (23:08 +0000)]
Produce the "drop notices" when dropping -- use correct file
Karl O. Pinc kop@karlpinc.com [Sat, 14 Feb 2026 23:05:57 +0000 (23:05 +0000)]
Ensure gen_func_comment_tmpl() is installed for recreate-db target
Dropping the schemas drops the function, and it needs to be re-installed.
Karl O. Pinc kop@karlpinc.com [Sat, 14 Feb 2026 23:02:55 +0000 (23:02 +0000)]
Install gen_func_comment_tmpl() only when comments change
Karl O. Pinc kop@karlpinc.com [Thu, 12 Feb 2026 04:01:10 +0000 (04:01 +0000)]
Update docs with new view code regardless of db DDL execution
Karl O. Pinc [Sun, 15 Mar 2026 23:22:43 +0000 (18:22 -0500)]
Add ESTRUS_STATES and ESTRUS_SOURCES to diagram
Karl O. Pinc [Sun, 15 Mar 2026 22:46:26 +0000 (17:46 -0500)]
Remove estrus columns from SIGHTINGS
Karl O. Pinc [Sun, 15 Mar 2026 22:39:53 +0000 (17:39 -0500)]
Add NON_BREC_SIGHTING_SOURCES to diagram
Karl O. Pinc kop@karlpinc.com [Tue, 10 Feb 2026 22:20:07 +0000 (22:20 +0000)]
Initial design of SIGHTINGS
Includes the tables: SIGHTINGS, NON_BREC_SIGHTING_SOURCES, SIGHTING_RECORDS
Karl O. Pinc kop@karlpinc.com [Mon, 10 Nov 2025 22:25:57 +0000 (22:25 +0000)]
Add arrival warning of contiguous time periods
Karl O. Pinc kop@karlpinc.com [Mon, 10 Nov 2025 22:09:45 +0000 (22:09 +0000)]
Document that event start and stop times are inclusive
Karl O. Pinc kop@karlpinc.com [Mon, 10 Nov 2025 22:02:24 +0000 (22:02 +0000)]
Note that there is a warning only when "certain" arrival events overlap
Karl O. Pinc kop@karlpinc.com [Mon, 10 Nov 2025 21:38:26 +0000 (21:38 +0000)]
Remove redundant arrivals warnings
Karl O. Pinc kop@karlpinc.com [Mon, 10 Nov 2025 21:37:18 +0000 (21:37 +0000)]
Add CYCLE_STATES.AsNum column
Karl O. Pinc kop@karlpinc.com [Mon, 10 Nov 2025 21:35:52 +0000 (21:35 +0000)]
Add a "double precision" replacement text
It might make sense to move the other double precision related
verbiage in CYCLE_STATES.AsNum into the epilog and make
futher replacement text.
Karl O. Pinc kop@karlpinc.com [Sat, 1 Nov 2025 22:22:15 +0000 (22:22 +0000)]
Put a TOC in each table's docs above the column docs
Karl O. Pinc kop@karlpinc.com [Sat, 1 Nov 2025 22:21:37 +0000 (22:21 +0000)]
Actually use the FOLLOW_STUDIES summary in the docs
Karl O. Pinc kop@karlpinc.com [Sat, 1 Nov 2025 22:10:41 +0000 (22:10 +0000)]
Add verbage describing code tables; move TOC to below the verbage
Karl O. Pinc kop@karlpinc.com [Sat, 1 Nov 2025 21:53:34 +0000 (21:53 +0000)]
Document ARRIVALS.Seq
Karl O. Pinc kop@karlpinc.com [Sat, 1 Nov 2025 21:51:02 +0000 (21:51 +0000)]
Add warnings regarding strange ARRIVALS rows
These could be hard rules, enforced with triggers. But that would
require data cleanup before conversion.
It would be good to add hard rules for all data that is entered into
the system after a certain date. Then, the date could gradually be
pushed back as older data is cleaned up. Unfortunately, this is not
in the budget.
Karl O. Pinc kop@karlpinc.com [Sat, 1 Nov 2025 21:50:14 +0000 (21:50 +0000)]
Fix markup
Karl O. Pinc kop@karlpinc.com [Mon, 27 Oct 2025 17:28:53 +0000 (17:28 +0000)]
Remove trailing spaces from follow_arrival.fa_fol_b_focal_animid
Fixes problem #56
Karl O. Pinc kop@karlpinc.com [Fri, 24 Oct 2025 07:48:00 +0000 (07:48 +0000)]
Fix lateral joins
Karl O. Pinc kop@karlpinc.com [Fri, 24 Oct 2025 05:48:35 +0000 (05:48 +0000)]
Update nesting state in clean during conversion; Problems #26 and #27
Karl O. Pinc kop@karlpinc.com [Wed, 22 Oct 2025 17:59:52 +0000 (17:59 +0000)]
Updated community membership rules
Never in a community before birth. Never in a community other than
the birth community before under study.
Tidy up error messages.
Karl O. Pinc kop@karlpinc.com [Tue, 21 Oct 2025 22:24:48 +0000 (22:24 +0000)]
Adjust conversion for BIOGRAPHY_DATA.DadPrelim -> DadStatus change
Solves conversion problem #11.
Karl O. Pinc kop@karlpinc.com [Tue, 21 Oct 2025 15:37:02 +0000 (15:37 +0000)]
Change BIOGRAPHY_DATA.DadPrelim to DadStatus, update views
This also involves making "special" the sdb_dad_prelim code (Prelim)
in DAD_STATUSES.
Karl O. Pinc kop@karlpinc.com [Mon, 20 Oct 2025 21:55:24 +0000 (21:55 +0000)]
Create and document the DAD_STATUSES support table
Karl O. Pinc kop@karlpinc.com [Mon, 20 Oct 2025 21:38:27 +0000 (21:38 +0000)]
Solve conversion problem #51, codes in db are ok to use
Karl O. Pinc kop@karlpinc.com [Mon, 20 Oct 2025 21:02:20 +0000 (21:02 +0000)]
Solve conversion problem #50; females with n/a cycle codes
Stevan Earl [Thu, 23 Oct 2025 22:06:38 +0000 (15:06 -0700)]
docs(schema): clarify that biography_log.dateofudpate cannot be null
Stevan Earl [Sun, 19 Oct 2025 16:11:41 +0000 (09:11 -0700)]
docs(erd): show nullability and quoted identifiers across ERDs
Updated ERD SVG diagrams (key, follows, events, demography) to:
- Annotate nullable columns consistently
- Indicate quoted identifiers for clarity where casing or reserved words matter
Purpose: improve schema comprehension and downstream tooling that parses diagrams.
Karl O. Pinc kop@karlpinc.com [Wed, 15 Oct 2025 01:34:22 +0000 (01:34 +0000)]
Cannot be too old or too young when the cycle code indicates swelling
This also makes "special", the "0" and "MISS" cycle codes.
And fixes so that MISS is allowed in all cases.
Karl O. Pinc kop@karlpinc.com [Mon, 13 Oct 2025 17:38:07 +0000 (17:38 +0000)]
Support converting a single table using multiple, serial, connections
Karl O. Pinc kop@karlpinc.com [Sun, 12 Oct 2025 21:27:49 +0000 (21:27 +0000)]
Add additional conditions to avoid unnecessary queries when updating
Karl O. Pinc kop@karlpinc.com [Sun, 12 Oct 2025 20:17:18 +0000 (20:17 +0000)]
Fix code comments describing too-early birth
Karl O. Pinc kop@karlpinc.com [Sun, 12 Oct 2025 19:47:24 +0000 (19:47 +0000)]
Fix maximum female adolescent swelling (sdb_adolsecent_swelling) test
Karl O. Pinc kop@karlpinc.com [Sun, 12 Oct 2025 17:49:50 +0000 (17:49 +0000)]
Fix test for minimum adolescent U swelling code
Karl O. Pinc kop@karlpinc.com [Sun, 12 Oct 2025 17:06:07 +0000 (17:06 +0000)]
Adjust female adolescent age limits
This resolves conversion problems #47 and #49.
Per email:
On Oct 9, 2025, at 7:05 PM, Ian Gilby <Ian.Gilby@asu.edu> wrote:
> In follow_arrival, the youngest legitimate "U" swelling is 5.1 (FN),
> and the oldest is 14.4 (VAN)
And subsequent discussion about using integral units.
Karl O. Pinc kop@karlpinc.com [Sat, 11 Oct 2025 23:47:06 +0000 (23:47 +0000)]
Cleanup of problem #31 and #32 taken care of in clean schema
Karl O. Pinc kop@karlpinc.com [Sat, 11 Oct 2025 23:42:58 +0000 (23:42 +0000)]
Split load_data.sql into multiple files to support staged conversion
See the conversion/Makefile comment for more info on staged conversion
and using db statistics.
Karl O. Pinc kop@karlpinc.com [Sat, 11 Oct 2025 21:56:53 +0000 (21:56 +0000)]
Standardize error messages in triggers
Karl O. Pinc [Fri, 10 Oct 2025 18:53:38 +0000 (13:53 -0500)]
Add ARRIVALS.Seq column to diagram
Karl O. Pinc kop@karlpinc.com [Fri, 10 Oct 2025 16:55:00 +0000 (16:55 +0000)]
Initial converson of follow_arrival table
Karl O. Pinc kop@karlpinc.com [Thu, 9 Oct 2025 02:46:02 +0000 (02:46 +0000)]
Fix reporting of ROLES.PID in error messages
Karl O. Pinc kop@karlpinc.com [Wed, 8 Oct 2025 23:37:10 +0000 (23:37 +0000)]
Fix the ARRIVALS trigger to correct Cycle column name
Karl O. Pinc kop@karlpinc.com [Wed, 8 Oct 2025 16:55:52 +0000 (16:55 +0000)]
Fix problems #31 and #32 by trimming spaces and upper-casing in clean
Karl O. Pinc kop@karlpinc.com [Mon, 6 Oct 2025 22:38:43 +0000 (22:38 +0000)]
There can be at most one arrival per event
Karl O. Pinc kop@karlpinc.com [Mon, 6 Oct 2025 22:34:33 +0000 (22:34 +0000)]
An ARRIVALS row must be related to an event with Behavior = sdb_arrival
Karl O. Pinc kop@karlpinc.com [Mon, 6 Oct 2025 21:39:23 +0000 (21:39 +0000)]
Use mixed-case people where possible; conversion problem #40
Create the people table in the clean schema and update the
follow table's observer columns in that schema, to make things easy
in load_data script.
Karl O. Pinc kop@karlpinc.com [Mon, 6 Oct 2025 20:17:48 +0000 (20:17 +0000)]
Resolve problem #37
Karl O. Pinc kop@karlpinc.com [Mon, 6 Oct 2025 20:17:25 +0000 (20:17 +0000)]
Note what solves conversion problem #38
Karl O. Pinc kop@karlpinc.com [Mon, 6 Oct 2025 17:41:38 +0000 (17:41 +0000)]
Change so sdb_male_swelling cannot be assigned to females
Karl O. Pinc kop@karlpinc.com [Mon, 6 Oct 2025 17:15:05 +0000 (17:15 +0000)]
Mark PEOPLE with "/" in their name inactive; conversion problem #39
Karl O. Pinc kop@karlpinc.com [Mon, 6 Oct 2025 16:48:26 +0000 (16:48 +0000)]
Change minimum age of first birth from 8 to 10 years
Karl O. Pinc kop@karlpinc.com [Sun, 5 Oct 2025 23:18:43 +0000 (23:18 +0000)]
Validate the use of CYCLE_STATES codes
Also, clarify the docs as to what the validation is. There is a range
of adolescent ages.
Karl O. Pinc kop@karlpinc.com [Sun, 5 Oct 2025 22:13:17 +0000 (22:13 +0000)]
Prevent ARRIVALS.ArID from changing
Karl O. Pinc kop@karlpinc.com [Sun, 5 Oct 2025 20:24:04 +0000 (20:24 +0000)]
Prevent ROLES.Participant from changing
Allowing the Participant to change means that the ROLES trigger must
check ARRIVALS.Cycle against sex and birthdate. And maybe other
checks. This is simpler.
Karl O. Pinc kop@karlpinc.com [Sun, 5 Oct 2025 17:39:28 +0000 (17:39 +0000)]
ROLES.Participant must be under study
Karl O. Pinc kop@karlpinc.com [Sun, 5 Oct 2025 15:54:42 +0000 (15:54 +0000)]
Prevent EVENTS.FID from changing
If the FID is allowed to change, at minimum -- there may be other
cases, the check that ROLES.Participant must be under study
becomes complicated. It would require code in the triggers
to trace the BIOGRAPHY_DATA.Animid <- ROLES.Participant ->
EVENTS.EID --> FOLLOWS.FID chain to check FOLLOWS.Date
against biography. Simpler to dis-allow change.
Karl O. Pinc kop@karlpinc.com [Sun, 5 Oct 2025 15:46:26 +0000 (15:46 +0000)]
Create and document the ARRIVALS table
Karl O. Pinc kop@karlpinc.com [Sun, 5 Oct 2025 15:44:54 +0000 (15:44 +0000)]
Add substitution reference for "tri-valued logic"
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 23:54:32 +0000 (23:54 +0000)]
Enforce single-ROLE row restrction for arrival events
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 23:25:57 +0000 (23:25 +0000)]
Prevent ROLES.EID from changing
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 23:24:56 +0000 (23:24 +0000)]
Prevent EVENTS.Behavior from changing
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 22:27:43 +0000 (22:27 +0000)]
More documentation of EVENTS.Behavior related rules
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 22:24:36 +0000 (22:24 +0000)]
Implement Start and Stop column constraints on EVENTS
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 22:09:58 +0000 (22:09 +0000)]
Initial trigger on ROLES, prevent PID change
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 22:07:47 +0000 (22:07 +0000)]
Initial trigger on EVENTS, prevent EID change
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 20:46:44 +0000 (20:46 +0000)]
Add ARRIVAL_SOURCES table; codes for arrvial/departure data source
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 17:08:09 +0000 (17:08 +0000)]
Index ROLES
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 16:52:00 +0000 (16:52 +0000)]
Index EVENTS
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 16:36:59 +0000 (16:36 +0000)]
Convert FOLLOW_STUDIES
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 16:07:25 +0000 (16:07 +0000)]
Index FOLLOW_STUDIES
Karl O. Pinc kop@karlpinc.com [Fri, 3 Oct 2025 15:04:00 +0000 (15:04 +0000)]
Index FOLLOW_OBSERVERS
Karl O. Pinc kop@karlpinc.com [Thu, 2 Oct 2025 23:36:58 +0000 (23:36 +0000)]
Make ROLE_CODES.Role unique when ignoring case
Karl O. Pinc kop@karlpinc.com [Thu, 2 Oct 2025 23:33:58 +0000 (23:33 +0000)]
Make PEOPLE.Person unique when ignoring case
Karl O. Pinc kop@karlpinc.com [Thu, 2 Oct 2025 23:29:58 +0000 (23:29 +0000)]
Make OBS_PERIODS.Period unique when ignoring case
Karl O. Pinc kop@karlpinc.com [Thu, 2 Oct 2025 23:26:58 +0000 (23:26 +0000)]
Make CYCLE_STATES.Code unique when ignoring case
Karl O. Pinc kop@karlpinc.com [Thu, 2 Oct 2025 23:21:24 +0000 (23:21 +0000)]
Make COMM_MEMBS_SOURCES.CommMembSource unique when ignoring case
Karl O. Pinc kop@karlpinc.com [Thu, 2 Oct 2025 23:15:15 +0000 (23:15 +0000)]
Make COMM_IDS.Name unique when ignoring case
Karl O. Pinc kop@karlpinc.com [Thu, 2 Oct 2025 23:10:28 +0000 (23:10 +0000)]
Make comm_ids.CommID unique when ignoring case