process request and operate db