choose DB as func