When we use resource_db and/or config_db?

In reply to deep123:

The scope is global in case of resource_db; so hierarchy is not important here. And always global scope is hardly required. Use config_db which itself extends from resource_db.