get database name dynamically in ResourceProvider