search

Home  >  Q&A  >  body text

Should mongodb history records be embedded in documents or referenced?

  1. rt

  2. rt

  3. rt

  4. rt

伊谢尔伦伊谢尔伦2759 days ago894

reply all(3)I'll reply

  • 阿神

    阿神2017-05-31 10:38:09

    It depends on the situation. If your historical record is for data analysis, for example, if you want to use MapReduce, it is recommended to embed it. If you don’t need to do analysis, it’s fine!

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-31 10:38:09

    If you add that entity A has a historical record called B, you should add a B table and store A's id.

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-31 10:38:09

    Generally, there are multiple historical records. It is recommended to save references and separate structures to reduce coupling

    reply
    0
  • Cancelreply