db manager implementation