Db refactory