load database into memory