fetching the db from req object