The Shang dynasty (Chinese: 商朝; pinyin: Shāng cháo) or Yin dynasty (Chinese: 殷代; pinyin: Yīn dài), according to traditional historiography, ruled in the Yellow River valleyin the second millennium BC, succeeding the Xia dynasty and followed by the Zhou dynasty.