A dynasty is a family that rules a nation from generation to generation. Dynasties in China ruled by the Mandate of heaven which stated that the leader was chosen by heaven to rule.
Legalism is a merit based system based on qualifications instead of birth. Confucianism's respect of children to parents and citizens to rulers is an example of filial piety.