seperate out db_handler functions from tenant/resources.py to data/model/tenant_util