[Babase] Billy is now Amok!

Niki Learn nlearn at princeton.edu
Thu May 6 09:30:49 EDT 2010


Neat.  So, should I rebuild members at the end of each demography upload or
is it really not useful?  Tabby had said it wasn't really necessary so I was
not real clear on whether I should do it or not so have just been doing it
anyway.  It takes about an hour to run though.  Maybe it is a hold over from
a time when it was useful?

-----Original Message-----
From: babase-bounces at eeblistserv.Princeton.EDU
[mailto:babase-bounces at eeblistserv.Princeton.EDU] On Behalf Of Karl O. Pinc
Sent: Wednesday, May 05, 2010 10:32 PM
To: The Baboon Database Project
Subject: Re: [Babase] Billy is now Amok!

FYI.  Linked to the archive of this thread on the wiki.

http://papio.biology.duke.edu/babasewiki/DocumentationLinks

On 05/05/2010 04:56:47 PM, Niki Learn wrote:
> Okay, we don't have to empty and rebuild members.  That makes it
> shorter.
> So here are the 8 steps needed to make Billy Amok.  And now it's all
> done!
> 
>  
> 
> update biograph set pid = 'BET5', birth = '1995-02-28', bstatus = 0,
> matgrp
> = 3.00 where sname = 'AMO'; 
> 
> Upload census files using upcen  (I had two files - one for Amok in
> Lodge
> group through Dec 1995 and then one for Amok in Joy's group in 
> 1996-7)
> 
> 
> update census set status = 'M', cen = 'f' where sname = 'AMO' and 
> date
> =
> '1995-12-31';
> 
> update census set status = 'M', cen = 'f' where sname = 'AMO' and 
> date
> =
> '1996-01-01';
> 
> UPDATE RANKS SET SNAME = 'AMO' WHERE SNAME ='BIL';
> UPDATE PARTS SET SNAME = 'AMO' WHERE SNAME ='BIL';
> 
> delete from census where sname = 'BIL';
> 
> delete from biograph where sname = 'BIL';
> 
>  
> 
> Note:  We deleted unnecessary manual census entries that were present
> for
> Billy, leaving only the two for Amok.
> 
> From: babase-bounces at eeblistserv.Princeton.EDU
> [mailto:babase-bounces at eeblistserv.Princeton.EDU] On Behalf Of Niki
> Learn
> Sent: Wednesday, May 05, 2010 5:10 PM
> To: 'The Baboon Database Project'
> Subject: RE: [Babase] Re: manual census entries
> 
>  
> 
> Billy will soon be Amok in babase.  All the steps together:
> 
>  
> 
> Empty members (as admin - do the rest as database manager) 
> 
> update biograph set pid = 'BET5', birth = '1995-02-28', bstatus = 0,
> matgrp
> = 3.00 where sname = 'AMO'; 
> 
> Upload census files using upcen  (I had two files - one for Amok in
> Lodge
> group through Dec 1995 and then one for Amok in Joy's group in 
> 1996-7)
> 
> 
> select rebuild_all_members();  (needed to do this for the next step,
> otherwise it threw errors) 
> 
> update census set status = 'M', cen = 'f' where sname = 'AMO' and 
> date
> =
> '1995-12-31';
> 
> update census set status = 'M', cen = 'f' where sname = 'AMO' and 
> date
> =
> '1996-01-01';
> 
> UPDATE RANKS SET SNAME = 'AMO' WHERE SNAME ='BIL';
> UPDATE PARTS SET SNAME = 'AMO' WHERE SNAME ='BIL';
> 
> delete from census where sname = 'BIL';
> 
> delete from biograph where sname = 'BIL';
> 
>  
> 
>  
> 
> Note the modification I made to the update census lines - forgot to
> fix that
> in my file - cen has to be false for status to be M.
> 
> (Aside:  Is emptying members necessary?  I'm thinking moving AMO's
> birthdate
> forward in time would make members mad if it weren't empty, yes?)
> 
>  
> 
> From: babase-bounces at eeblistserv.Princeton.EDU
> [mailto:babase-bounces at eeblistserv.Princeton.EDU] On Behalf Of Lacey
> Maryott
> Roerish
> Sent: Wednesday, May 05, 2010 4:55 PM
> To: The Baboon Database Project
> Subject: Re: [Babase] Re: manual census entries
> 
>  
> 
> MY UPDATE STATEMENTS ARE 
> 
> UPDATE RANKS SET SNAME = 'AMO' WHERE SNAME ='BIL';
> UPDATE PARTS SET SNAME = 'AMO' WHERE SNAME ='BIL';
> 
>  
> 
> On Wed, May 5, 2010 at 4:49 PM, Karl O. Pinc <kop at meme.com> wrote:
> 
> On 05/05/2010 03:39:44 PM, Niki Learn wrote:
> > Yes, you have to be babase_admin to empty members.  I do it every
> > update.
> > Actually I didn't even try NOT emptying members - I just assumed it
> > would be
> > necessary since we were messing with census data.  But then it 
> threw
> > errors
> > when I tried to change the census entries to manual because the
> > latter
> > part
> > of Amok's life had not been rebuilt yet in members so it didn't 
> like
> > him
> > having ranks and stuff when he wasn't listed as being in the group.
> > Do you
> > think we could have skipped the members part.
> >
> > We can't delete Billy's census data until the end, after all his
> > ranks
> > and
> > parts data has been switched over to Amok.  We can't switch that
> over
> > until
> > Amok is in census.  It is a circle.
> 
> There's no restriction on having Amok and Billy be censused in
> the same group.  So I'd expect you'd add Amok's census entries
> first, then move all the data by deleting stuff from Billy
> and adding it to Amok, then delete Billy's census entries
> last.
> 
> The basic principle would be to delete in an order that's
> opposite from the order in which you add.
> 
>  I guess if there is a way to do
> > all
> > three simultaneously then we wouldn't need as many steps.  But I 
> got
> > rid of
> > most of the manual census entries anyway so whatever.  This worked
> so
> > we are
> > happy.
> 
> Yes.  You don't care so much about deleting Billy's members because
> you know he's going away so you don't care about errors.  It's
> just a little spooky having to be babase_admin.  Sort of like
> resorting to a hammer.  Nothing wrong with a hammer though,
> it's a fine tool.  :-)
> 
> 
> >
> > -----Original Message-----
> > From: Karl O. Pinc [mailto:kop at meme.com]
> > Sent: Wednesday, May 05, 2010 4:26 PM
> > To: Niki Learn
> > Subject: Re: manual census entries
> >
> 
> > On 05/05/2010 03:20:10 PM, Niki Learn wrote:
> > > I guess we should make sure each office has a full list of the
> > steps
> > > in case
> > > we ever have to do this again.  Most of them aren't in here
> though.
> > > Shall
> > > we compile a list of the steps and send that to the list for
> > > archiving?
> > > Here's what I have:
> > >
> > > Empty members
> >
> 
> > Wouldn't you have to be babase_admin to do this?
> >
> > As an alternative why not delete all the
> > census rows?
> >
> >
> >
> >
> > Karl <kop at meme.com>
> > Free Software:  "You don't pay back, you pay forward."
> >                  -- Robert A. Heinlein
> >
> >
> >
> >
> 
> 
> 
> 
> Karl <kop at meme.com>
> Free Software:  "You don't pay back, you pay forward."
>                 -- Robert A. Heinlein
> 
> 
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase
> 
> 
> 
> 
> -- 
> - -
> Lacey K. Maryott Roerish
> Alberts Lab
> Department of Biology
> Duke University
> ph: 919-660-7306
> fax: 919-660-7293
> Lacey.Maryott at duke.edu
> 
> 

------quoted attachment------
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase
> 




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


_______________________________________________
Babase mailing list
Babase at www.eco.princeton.edu
http://www.eco.princeton.edu/mailman/listinfo/babase



More information about the Babase mailing list