[Babase] Statdate definition
Karl O. Pinc
babase@www.eco.princeton.edu
Wed, 7 Jul 2004 10:55:39 -0500
Hi y'all,
Seeing as how we're allowing an individual to have data which
postdates the individual's Statdate in the database I want to nail
down just what the Statdate is.
The original documentation:
---------------------------<snip>-----------------------------
Statdate
The status date of the individual. This is the latest date on which
the animal was censused, or the latest date on which there are other
observational notes on the individual -- whichever is later. Note
that this means that the ultimate Statdate of the individual will be
the actual or estimated date of death. This field is automatically
updated by the UPMEMB program with the last day the animal was
observed in a census. Care should be taken when maintaining this
field, particularly when reducing the Statdate, because there should
not be a row in the MEMBERS table to assign a location to the
individual on a date later than the individual's Statdate. In
general, reducing the Statdate may leave an individual with recorded
activity which takes place after the individual's death or last
observation.
This field may not be blank.
---------------------------<snip>-----------------------------
This next text is what I had been thinking until the last phone
meeting. This still appeals to me as it provides a good check to
prevent accidentally entering a date in the future. Note that there's
no reason to caution regards reducing the Statdate as the database
won't allow a Statdate to be before other data. Also, we haven't got
the programs designed, we could make any operation or application
which enters other dates automatically update the Statdate, although
this eliminates the check on invalid dates which Statdate. (The
census program is a good candidate for automatically updating the
Statdate in this regard as it's somewhat difficult to get the census
date wrong. Of course from an operational perspective, you wouldn't
want to have to manually update Statdates each time you did a census.)
I'm kind of attached to this version of the Statdate because I've
thought all along of the Statdate as the 'last date updated' and the
Foxpro documentation reflects this. Of course you haven't had to use
the database this way so the documentation does not reflect reality.
I'm attached enough to consider making another column which has the
Statdate-as-data-check definition. This could be over designing,
you'd certainly need to spend some effort maintaining it, and the
question is whether the check it would provide has any utility. Of
course we could reduce the effort of maintaining
Statdate-as-data-check with application support, but the easier/more
automated this is the less value there is in the column as a check.
There's also the possibility of altering the data entry schedule so
that you update census information before entering other (say, sexual
cycle) data. The new system will not require Foxpro when entering
data into the computer, census data entered into excel and exported as
comma delimited plain text would be quite small. 10s of bytes/month,
maybe less when compressed (it could be cheaper to mail it in the body
of the email rather than compress it and send it as an attachment).
This sounds affordable to email from Amboseli so there are
possibilities with the new system which you have not previously had.
You seem to need a Statdate-as-you-are-using-it, the last census date,
in your queries so we certainly need a column with this data in it.
---------------------------<snip>-----------------------------
Statdate
The status date of the individual. This is the latest date for which
the database contains dated data on the individual. This field is
updated by the <program which updates the census> to the last date the
individual was observed in a census. The operator entering other
dates related to an individual must manually change the Statdate to
the latest associated date. The ultimate Statdate of the individual
will be the actual or estimated date of death.
This field may not be NULL.
---------------------------<snip>-----------------------------
Here's the definition I've come up with for Statdate as it stands now.
This will require some correction I imagine (see below).
---------------------------<snip>-----------------------------
Statdate
The status date of the individual. This is the latest date on which
the animal was censused, or the latest date on which there are
demography notes on the individual -- whichever is later. This field
is updated by the <program which updates the census> to the last date
the individual was observed in a census. The ultimate Statdate of the
individual will be the actual or estimated date of death. The
Statdate of dead individuals must fall on or after the last date the
database records in any row related to the individual.
This field may not be NULL.
---------------------------<snip>-----------------------------
Questions arise because the Foxpro documentation says that the
following system dates must be on or before an individual's Statdate:
All the dates on CYCLES
SEXSKINS.Date
INTERACT.Date
CENSUS.Date
We've no documentation on the point samples.
We've already said that CYCLES dates may be after the Statdate so long
as the individual is not dead. I assume this is true of SEXSKINS as
well, and REPSTATS and CYCSTATS (and PREGS) dates are all from CYCLES
so it's true there too. We want the CENSUS dates to be on or before
Statdate, and MEMBERS dates go with CENSUS dates.
So, what about the interactions, the point samples, and any other data
that anybody can think of?
Karl <kop@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein