UVM config db and resource db

can anyone explain how does uvm resource db and uvm_config_db’s behavior change depending on the phase of the simulation, and what is meant by “parent wins” and “last write wins” in this context?