client db iterface and in memory impl