wrote a little in-memory database class

also wrote code for select activity