db as callback