Refactor common_db client code

No match.