optimize the common db manager