connect requests to db queries