Implementation of get_action and get_client from DB