[Babase] male dispersal query

Karl O. Pinc kop at meme.com
Fri May 14 17:33:52 EDT 2010


Hi,
Susan and I just spoke on the phone and we decided
that two new interfaces (views or other view-like things
that appear to be tables) are called for.

A GROUPMOVES view.  This would be one row for
each time an individual changed groups.  It would
show the last day in the old group, the first day in
the new group, the old group, the new group, and the
sname.

A MALEMOVES view.  This is the view that Susan describes below.
However Susan had a caveat in that she expressed a desire to
ignore "small" absences from a group, where "small" is variable
and can be different for group 9 than for other groups.

One question that Susan and I didn't discuss are birth
and statdate and how they would appear (or not) in the
results.  If anyone has any comment please let me know.
FWIW it'd be easiest if neither the group membership
that starts at birth nor the group memebership that ends
with (or after) the statdate appear.  That does not sound
like a good feature though so most likely I'll have
the "prior group" for birth and the "next group" for
statdate be NULL.

I'll see about working on this.  I'll also read Niki's email
more closely and see what we need to address there.

FWIW these are all self-join issues, although the "small
absence fuzz factor" makes things tricky and I may not use
a view at all in this aspect of the implementation.  (Translation:
You may not be able to write a sane query that does this.)

On 05/14/2010 02:16:40 PM, Susan Alberts wrote:
> HI Karl,
> 
> Here is a problem that has come up before and will again.
> 
> We'd like to be able to extract data from members of the following  
> form, regarding male dispersal and group membership patterns
> 
> Group, Date into that group, Date out of that group, Sname
> 
> Where each male has an exhaustive set of rows that shows where he is  
> for all the chunks of his life. I don't know how to get this out of  
> members easily.
> 
> Can you provide advise? Is this something we could set up as a view  
> sometime?






Karl <kop at meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein




More information about the Babase mailing list