The different between factory, config_dg, and resources_db

I will appreciate if someone could clarify the different between factory, config_dg, and resources_db

In reply to saritr:

resource_db is the basic database. config_db is a layer on top of the resource_db which provides an extended funtionality.