From the incomplete information you provide, it looks like you should keep a Movements table:
Date/Time Group Action Person // The Universe
17/7/2009 10:01:00 Group A Enter John // {A: John}
17/7/2009 10:02:00 Group A Enter Sally // {A: John, Sally}
17/7/2009 11:22:23 Group B Enter Pete // {A: John, Sally}, {B: Pete}
17/7/2009 11:34:45 Group A Exit John // {A: Sally}, {B: Pete}
Note that the universe can be calculated just from the movements table. (Of course as the table grows this calculation becomes more costly, but I'm just making a basic suggestion.)
Daniel Daranas
2009-07-31 10:40:54