【MongoDB】The connection between two tables

时间:2014-10-22 06:28:15   收藏:0   阅读:197

In mongoDB, there are two general way to connect with two tables. Manual Connection and use DBRef

1. Basically manual connection 

Firstly init the data which was saved in the different collections. 

bubuko.com,布布扣

The result:

bubuko.com,布布扣

2 usage of  DBRef

grammar: 

bubuko.com,布布扣

the example: 

bubuko.com,布布扣

Attention: the above example has some question;


评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!