Join two collections in MongoDB

前端 未结 5 764
旧时难觅i
旧时难觅i 2021-01-23 18:33

Am a beginner in mongoDB. I have two collections Book and author. [name and workswritten] are the common column respectively. Using inner join I have to emit the some columns in

5条回答
  •  庸人自扰
    2021-01-23 19:25

    MongoDB does not support JOIN operations. When you need this functionality, you have to implement it yourself by querying both collections.

    For that reason it's often a good strategy to use embedding instead of linking.

    A Map/Reduce job is usually a very expensive operation. It should only be used occasionally for data mining purposes.

提交回复
热议问题